From 89a6ff82240695bc4ff6e9b1612003f8346f9c07 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 19 Aug 2024 18:15:33 +0100 Subject: [PATCH] Comments --- synapse/handlers/sliding_sync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index a1412d20f4..43a847c63e 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -123,7 +123,9 @@ def get_rooms(from_token: SlidingSyncStreamToken) -> None: event_stream_change_cache_valid = ... if from_token and event_stream_change_cache_valid: - # Get all the rooms again, this call can be cached. + # Get all the rooms again, this call can be cached. Since we know we can + # use the stream change we don't have to hit the DB again to get the + # changed rooms. sql = """ SELECT s.room_id, s.membership, s.event_stream_ordering FROM sliding_sync_membership_snapshots AS s