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

Commit 9b67715

Browse files
authored
Disable proactive sends for remote joins (#12330)
Do not attempt to send remote joins out over federation. Normally, it will do nothing; occasionally, it will do the wrong thing.
1 parent 437a8ed commit 9b67715

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

changelog.d/12330.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Avoid trying to calculate the state at outlier events.

synapse/handlers/federation_event.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,12 @@ async def process_remote_join(
469469
if context.rejected:
470470
raise SynapseError(400, "Join event was rejected")
471471

472+
# the remote server is responsible for sending our join event to the rest
473+
# of the federation. Indeed, attempting to do so will result in problems
474+
# when we try to look up the state before the join (to get the server list)
475+
# and discover that we do not have it.
476+
event.internal_metadata.proactively_send = False
477+
472478
return await self.persist_events_and_notify(room_id, [(event, context)])
473479

474480
async def backfill(

0 commit comments

Comments
 (0)