summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-05-29 11:58:32 +0100
committerErik Johnston <erik@matrix.org>2019-05-30 16:15:37 +0100
commit1d818fde14595299de9e13008c67239ca677014f (patch)
tree0a177261aed4be263d9a238a3d9afa4a202a679a /synapse/storage/events.py
parentAdd DB bg update to cleanup extremities. (diff)
downloadsynapse-1d818fde14595299de9e13008c67239ca677014f.tar.xz
Log actual number of entries deleted
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index a9be143bd5..a9664928ca 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -2476,7 +2476,7 @@ class EventsStore(
 
             logger.info("Deleting up to %d forward extremities", len(to_delete))
 
-            self._simple_delete_many_txn(
+            deleted = self._simple_delete_many_txn(
                 txn=txn,
                 table="event_forward_extremities",
                 column="event_id",
@@ -2484,7 +2484,9 @@ class EventsStore(
                 keyvalues={},
             )
 
-            if to_delete:
+            logger.info("Deleted %d forward extremities", deleted)
+
+            if deleted:
                 # We now need to invalidate the caches of these rooms
                 rows = self._simple_select_many_txn(
                     txn,