summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2022-03-30 12:04:35 +0100
committerGitHub <noreply@github.com>2022-03-30 12:04:35 +0100
commit9b67715bc3643ff4baeb928aa9634c2c64af93ad (patch)
tree5549834c41da35b1688b2903eb0d60dccae800d3
parentAdd a configuration to exclude rooms from sync response (#12310) (diff)
downloadsynapse-9b67715bc3643ff4baeb928aa9634c2c64af93ad.tar.xz
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.
-rw-r--r--changelog.d/12330.misc1
-rw-r--r--synapse/handlers/federation_event.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/changelog.d/12330.misc b/changelog.d/12330.misc
new file mode 100644
index 0000000000..9f333e718a
--- /dev/null
+++ b/changelog.d/12330.misc
@@ -0,0 +1 @@
+Avoid trying to calculate the state at outlier events.
diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py
index 4bd87709f3..567afc910f 100644
--- a/synapse/handlers/federation_event.py
+++ b/synapse/handlers/federation_event.py
@@ -469,6 +469,12 @@ class FederationEventHandler:
             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(