mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-20 17:34:05 -04:00
Ensure fed-sender catchup does not block for full state (#15248)
* Reproduce bad scenario in test * Avoid catchup optimisation for partial state rooms
This commit is contained in:
parent
4bb26c95a9
commit
c071cd5a0e
4 changed files with 125 additions and 3 deletions
|
@ -497,8 +497,8 @@ class PerDestinationQueue:
|
|||
#
|
||||
# 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 newest 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
|
||||
|
@ -516,6 +516,11 @@ class PerDestinationQueue:
|
|||
# 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 await 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 newest PDU the remote is missing from us.
|
||||
room_catchup_pdus = [pdu]
|
||||
else:
|
||||
# If not, fetch the extremities and figure out which we can
|
||||
# send.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue