diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-11-01 12:07:05 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-11-04 09:56:11 +0000 |
commit | 3b29a73f9fc18912a6b775a083d9449d426fa790 (patch) | |
tree | eb49ea92a9d074514e4673195b45670c483a0360 /synapse/storage/data_stores | |
parent | Correctly order results (diff) | |
download | synapse-3b29a73f9fc18912a6b775a083d9449d426fa790.tar.xz |
Print out the actual number of affected rows
Diffstat (limited to 'synapse/storage/data_stores')
-rw-r--r-- | synapse/storage/data_stores/main/events_bg_updates.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/data_stores/main/events_bg_updates.py b/synapse/storage/data_stores/main/events_bg_updates.py index 5ba1cff468..a703927471 100644 --- a/synapse/storage/data_stores/main/events_bg_updates.py +++ b/synapse/storage/data_stores/main/events_bg_updates.py @@ -527,7 +527,7 @@ class EventsBackgroundUpdatesStore(BackgroundUpdateStore): rows = self.cursor_to_dict(txn) if not rows: - return True + return True, 0 for row in rows: event_id = row["event_id"] @@ -550,13 +550,13 @@ class EventsBackgroundUpdatesStore(BackgroundUpdateStore): # We want to return true (to end the background update) only when # the query returned with less rows than we asked for. - return len(rows) != batch_size + return len(rows) != batch_size, len(rows) - end = yield self.runInteraction( + end, num_rows = yield self.runInteraction( desc="event_store_labels", func=_event_store_labels_txn ) if end: yield self._end_background_update("event_store_labels") - return batch_size + return num_rows |