From 350d582c081a3c599093ab5e578580d326f82db5 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Mon, 13 Nov 2023 13:34:54 +0000 Subject: [PATCH] Remove stream token-per-persister removal hack This was an old issue that is now believed to be fixed in synapse. --- synapse/handlers/sync.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index a5933b8f5f3e..e0a55b2485c8 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -1378,16 +1378,6 @@ async def generate_sync_result( # Always use the `now_token` in `SyncResultBuilder` now_token = self.event_sources.get_current_token() - # Beeper change: remove any per-instance stream token positions, this - # happens when one or more event persisters fall behind the others, in - # practice this is very rare and usually only ~1-2 events. By removing - # this we dramatically simplify debugging issues, checking caches and - # generating room previews. - now_token = now_token.copy_and_replace( - StreamKeyType.ROOM, - RoomStreamToken(None, now_token.room_key.stream), - ) - if debug_current_token: logger.info( "Overriding sync current token for debugging to: %r",