Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Faster room joins: Send device list updates out to servers in partially joined rooms #13874

Merged
merged 5 commits into from
Sep 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update get_current_hosts_in_room docstring
Update the docstring for `get_current_hosts_in_room` to mention the
blocking behaviour for rooms with partial state. Also document the order
of returned hosts.

Signed-off-by: Sean Quah <[email protected]>
  • Loading branch information
Sean Quah committed Sep 22, 2022
commit 3681eb4520a8ee5ada057cc9e18e7ee44308fbdc
10 changes: 9 additions & 1 deletion synapse/storage/controllers/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,15 @@ async def get_current_state_event(
return state_map.get(key)

async def get_current_hosts_in_room(self, room_id: str) -> List[str]:
"""Get current hosts in room based on current state."""
"""Get current hosts in room based on current state.

Blocks until we have full state for the given room. This only happens for rooms
with partial state.

Returns:
A list of hosts in the room, sorted by longest in the room first. (aka.
sorted by join with the lowest depth first).
"""

await self._partial_state_room_tracker.await_full_state(room_id)

Expand Down