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

Commit 4569eda

Browse files
author
Mathieu Velten
authored
Use servers list approx to send read receipts when in partial state (#14549)
Signed-off-by: Mathieu Velten <[email protected]>
1 parent ecb6fe9 commit 4569eda

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

changelog.d/14549.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Faster joins: use servers list approximation to send read receipts when in partial state instead of waiting for the full state of the room.

synapse/federation/sender/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ async def send_read_receipt(self, receipt: ReadReceipt) -> None:
647647
room_id = receipt.room_id
648648

649649
# Work out which remote servers should be poked and poke them.
650-
domains_set = await self._storage_controllers.state.get_current_hosts_in_room(
650+
domains_set = await self._storage_controllers.state.get_current_hosts_in_room_or_partial_state_approximation(
651651
room_id
652652
)
653653
domains = [

tests/federation/test_federation_sender.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def make_homeserver(self, reactor, clock):
3838
return_value=make_awaitable({"test", "host2"})
3939
)
4040

41+
hs.get_storage_controllers().state.get_current_hosts_in_room_or_partial_state_approximation = (
42+
hs.get_storage_controllers().state.get_current_hosts_in_room
43+
)
44+
4145
return hs
4246

4347
@override_config({"send_federation": True})

0 commit comments

Comments
 (0)