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

Commit

Permalink
Disable proactive sends for remote joins (#12330)
Browse files Browse the repository at this point in the history
Do not attempt to send remote joins out over federation. Normally, it will do
nothing; occasionally, it will do the wrong thing.
  • Loading branch information
richvdh authored Mar 30, 2022
1 parent 437a8ed commit 9b67715
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/12330.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid trying to calculate the state at outlier events.
6 changes: 6 additions & 0 deletions synapse/handlers/federation_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,12 @@ async def process_remote_join(
if context.rejected:
raise SynapseError(400, "Join event was rejected")

# the remote server is responsible for sending our join event to the rest
# of the federation. Indeed, attempting to do so will result in problems
# when we try to look up the state before the join (to get the server list)
# and discover that we do not have it.
event.internal_metadata.proactively_send = False

return await self.persist_events_and_notify(room_id, [(event, context)])

async def backfill(
Expand Down

0 comments on commit 9b67715

Please sign in to comment.