diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2022-09-23 17:55:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-23 17:55:15 +0100 |
commit | f49f73c0da5502792c65d3de1ffd352ceb6af562 (patch) | |
tree | e8d5b3977fbedc192df6b8b4a3a1ec26aa0eff22 /synapse/handlers | |
parent | Fix access token leak to logs from proxyagent (#13855) (diff) | |
download | synapse-f49f73c0da5502792c65d3de1ffd352ceb6af562.tar.xz |
Faster room joins: Avoid blocking `/keys/changes` (#13888)
Part of the work for #12993. Once #12993 is fully resolved, we expect `/keys/changes` to behave sensibly when joined to a room with partial state. Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/device.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 6566b3bf3d..bad262731c 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -195,7 +195,9 @@ class DeviceWorkerHandler: possibly_changed = set(changed) possibly_left = set() for room_id in rooms_changed: - current_state_ids = await self._state_storage.get_current_state_ids(room_id) + current_state_ids = await self._state_storage.get_current_state_ids( + room_id, await_full_state=False + ) # The user may have left the room # TODO: Check if they actually did or if we were just invited. @@ -234,7 +236,8 @@ class DeviceWorkerHandler: # mapping from event_id -> state_dict prev_state_ids = await self._state_storage.get_state_ids_for_events( - event_ids + event_ids, + await_full_state=False, ) # Check if we've joined the room? If so we just blindly add all the users to |