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

Commit

Permalink
Allow PUT/GET of aliases during faster join (#14292)
Browse files Browse the repository at this point in the history
without blocking on full state.
  • Loading branch information
David Robertson authored Nov 1, 2022
1 parent 2b56aaa commit 2bd7f3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/14292.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Faster joins: do not block creation of or queries for room aliases during the resync.
4 changes: 2 additions & 2 deletions synapse/handlers/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async def _create_association(
# TODO(erikj): Add transactions.
# TODO(erikj): Check if there is a current association.
if not servers:
servers = await self._storage_controllers.state.get_current_hosts_in_room(
servers = await self._storage_controllers.state.get_current_hosts_in_room_or_partial_state_approximation(
room_id
)

Expand Down Expand Up @@ -290,7 +290,7 @@ async def get_association(self, room_alias: RoomAlias) -> JsonDict:
Codes.NOT_FOUND,
)

extra_servers = await self._storage_controllers.state.get_current_hosts_in_room(
extra_servers = await self._storage_controllers.state.get_current_hosts_in_room_or_partial_state_approximation(
room_id
)
servers_set = set(extra_servers) | set(servers)
Expand Down

0 comments on commit 2bd7f3e

Please sign in to comment.