diff options
author | Erik Johnston <erik@matrix.org> | 2023-04-06 17:42:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 16:42:39 +0000 |
commit | 485b9fdefb9f45df172ff5044d6a02a177b7de19 (patch) | |
tree | 6046f925f91a4d54eacedfb22219b480c03be427 /synapse/handlers/device.py | |
parent | Merge remote-tracking branch 'origin/release-v1.81' into develop (diff) | |
download | synapse-485b9fdefb9f45df172ff5044d6a02a177b7de19.tar.xz |
Don't keep old stream_ordering_to_exterm around (#15382)
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 9ded6389ac..d2063d4435 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -215,6 +215,16 @@ class DeviceWorkerHandler: possibly_changed = set(changed) possibly_left = set() for room_id in rooms_changed: + # Check if the forward extremities have changed. If not then we know + # the current state won't have changed, and so we can skip this room. + try: + if not await self.store.have_room_forward_extremities_changed_since( + room_id, stream_ordering + ): + continue + except errors.StoreError: + pass + current_state_ids = await self._state_storage.get_current_state_ids( room_id, await_full_state=False ) |