diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-10-31 23:01:26 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-11-04 09:56:11 +0000 |
commit | 1586f2c7e716fb066aa5551bdce654be8e35b01d (patch) | |
tree | deef95e1afbdf3bd3606d0a27287a84aff5f0d5c /synapse/storage | |
parent | Lint (diff) | |
download | synapse-1586f2c7e716fb066aa5551bdce654be8e35b01d.tar.xz |
Fix exit condition
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/data_stores/main/events_bg_updates.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/data_stores/main/events_bg_updates.py b/synapse/storage/data_stores/main/events_bg_updates.py index 10ebc6d865..72d600c51b 100644 --- a/synapse/storage/data_stores/main/events_bg_updates.py +++ b/synapse/storage/data_stores/main/events_bg_updates.py @@ -546,7 +546,9 @@ class EventsBackgroundUpdatesStore(BackgroundUpdateStore): txn, "event_store_labels", {"last_event_id": event_id} ) - return len(rows) == batch_size + # 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 end = yield self.runInteraction( desc="event_store_labels", func=_event_store_labels_txn |