Skip to content

Commit

Permalink
bugfix: ensure we can sync with SSS even with missing rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Sep 18, 2024
1 parent 51dd4df commit 10b00a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions synapse/storage/databases/main/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,10 @@ async def bulk_get_last_event_pos_in_room_before_stream_ordering(
recheck_rooms: Set[str] = set()
min_token = end_token.stream
for room_id, stream in uncapped_results.items():
if stream is None:
# Despite the function not directly setting None, the cache can!
# See: https://github.com/element-hq/synapse/issues/17726
continue
if stream <= min_token:
results[room_id] = stream
else:
Expand Down

0 comments on commit 10b00a2

Please sign in to comment.