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

Commit

Permalink
Avoid catchup optimisation for partial state rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Mar 10, 2023
1 parent 3d9e04c commit 065537f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions synapse/federation/sender/per_destination_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ async def _catch_up_transmission_loop(self) -> None:
#
# Note: `catchup_pdus` will have exactly one PDU per room.
for pdu in catchup_pdus:
# The PDU from the DB will be the last PDU in the room from
# *this server* that wasn't sent to the remote. However, other
# The PDU from the DB will be the oldest PDU in the room from
# *this server* that we tried---but were unable---to send to the remote.
# servers may have sent lots of events since then, and we want
# to try and tell the remote only about the *latest* events in
# the room. This is so that it doesn't get inundated by events
Expand All @@ -516,6 +516,11 @@ async def _catch_up_transmission_loop(self) -> None:
# If the event is in the extremities, then great! We can just
# use that without having to do further checks.
room_catchup_pdus = [pdu]
elif self._store.is_partial_state_room(pdu.room_id):
# We can't be sure which events the destination should
# see using only partial state. Avoid doing so, and just retry
# sending our the oldest PDU the remote is missing from us.
room_catchup_pdus = [pdu]
else:
# If not, fetch the extremities and figure out which we can
# send.
Expand Down

0 comments on commit 065537f

Please sign in to comment.