mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
Fix _bulk_get_max_event_pos
being wrong/inefficient
It kept adding all of the `batch_results` to the `results` over and over every time we checked a single room in the batch. I think we still ended up with the right answer before because we accumulate `recheck_rooms` and actually recheck them to overwrite the bad data we wrote to the `results` before.
This commit is contained in:
parent
ff8e8fb02e
commit
2a30e72520
1 changed files with 1 additions and 1 deletions
|
@ -1587,7 +1587,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
|
|||
)
|
||||
for room_id, stream_ordering in batch_results.items():
|
||||
if stream_ordering <= now_token.stream:
|
||||
results.update(batch_results)
|
||||
results[room_id] = stream_ordering
|
||||
else:
|
||||
recheck_rooms.add(room_id)
|
||||
|
||||
|
|
Loading…
Reference in a new issue