diff options
author | Erik Johnston <erik@matrix.org> | 2020-01-08 14:27:35 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2020-01-08 14:27:35 +0000 |
commit | bca3455b3860b80199e3b750a99de6e13d636d82 (patch) | |
tree | 4f1678be9957f0567bdf08ac7b9a70b59f94252b /synapse/storage/data_stores | |
parent | Do not rely on streaming events, as media repo doesn't (diff) | |
download | synapse-bca3455b3860b80199e3b750a99de6e13d636d82.tar.xz |
Comments
Diffstat (limited to 'synapse/storage/data_stores')
-rw-r--r-- | synapse/storage/data_stores/main/room.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/data_stores/main/room.py b/synapse/storage/data_stores/main/room.py index 0509d9f64d..11e93fd668 100644 --- a/synapse/storage/data_stores/main/room.py +++ b/synapse/storage/data_stores/main/room.py @@ -453,6 +453,8 @@ class RoomWorkerStore(SQLBaseStore): remote_media_mxcs = [] while True: + # The first time round we just want to get the most recent + # events, then we bound by stream ordering if next_token is None: sql = """ SELECT stream_ordering, json FROM events @@ -496,6 +498,7 @@ class RoomWorkerStore(SQLBaseStore): remote_media_mxcs.append((hostname, media_id)) if next_token is None: + # We've gone through the whole room, so we're finished. break return local_media_mxcs, remote_media_mxcs |