summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/data_stores/main/events_bg_updates.py4
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 bee8c9cfa0..a4cb64f479 100644
--- a/synapse/storage/data_stores/main/events_bg_updates.py
+++ b/synapse/storage/data_stores/main/events_bg_updates.py
@@ -525,9 +525,11 @@ class EventsBackgroundUpdatesStore(BackgroundUpdateStore):
                 (last_event_id, batch_size),
             )
 
+            results = list(txn)
+
             nbrows = 0
             last_row_event_id = ""
-            for (event_id, event_json_raw) in txn:
+            for (event_id, event_json_raw) in results:
                 event_json = json.loads(event_json_raw)
 
                 self._simple_insert_many_txn(