Skip to content

Commit

Permalink
Short-circuit have_finished_sliding_sync_background_jobs
Browse files Browse the repository at this point in the history
We only need to check this if returned bump stamp is `None`, which is
rare.
  • Loading branch information
erikjohnston authored and MadLittleMods committed Sep 17, 2024
1 parent d40bc27 commit bca64a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/handlers/sliding_sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,8 +1171,8 @@ async def _get_bump_stamp(
# `SCHEMA_COMPAT_VERSION` and run the foreground update for
# `sliding_sync_joined_rooms`/`sliding_sync_membership_snapshots`
# (tracked by https://github.com/element-hq/synapse/issues/17623)
await self.store.have_finished_sliding_sync_background_jobs()
and latest_room_bump_stamp is None
latest_room_bump_stamp is None
and await self.store.have_finished_sliding_sync_background_jobs()
):
return None

Expand Down

0 comments on commit bca64a7

Please sign in to comment.