mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 00:45:00 -04:00
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>
This commit is contained in:
parent
8e9fc28c6a
commit
0a686d1d13
9 changed files with 77 additions and 37 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue