diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2023-02-03 15:39:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-03 15:39:59 +0000 |
commit | 0a686d1d13c497af84f62ca192a401fdc18387ab (patch) | |
tree | 957f546554b6a193e3e01fbd530349abb259d636 /synapse/handlers/device.py | |
parent | Reload the pyo3-log config when the Python logging config changes. (#14976) (diff) | |
download | synapse-0a686d1d13c497af84f62ca192a401fdc18387ab.tar.xz |
Faster joins: Refactor handling of servers in room (#14954)
Ensure that the list of servers in a partial state room always contains the server we joined off. Also refactor `get_partial_state_servers_at_join` to return `None` when the given room is no longer partial stated, to explicitly indicate when the room has partial state. Otherwise it's not clear whether an empty list means that the room has full state, or the room is partial stated, but the server we joined off told us that there are no servers in the room. Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 5c06073901..6f7963df43 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -859,6 +859,7 @@ class DeviceHandler(DeviceWorkerHandler): known_hosts_at_join = await self.store.get_partial_state_servers_at_join( room_id ) + assert known_hosts_at_join is not None potentially_changed_hosts.difference_update(known_hosts_at_join) potentially_changed_hosts.discard(self.server_name) |