summary refs log tree commit diff
path: root/synapse/app
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-01-06 17:16:28 +0000
committerRichard van der Hoff <richard@matrix.org>2020-01-06 17:16:28 +0000
commit26c5d3d39842308da326172eb54672056f90a050 (patch)
tree47c9ca9ceb019db5f547efb2455c5921a0b5f24f /synapse/app
parentasync/await for SyncReplicationHandler.process_and_notify (diff)
downloadsynapse-26c5d3d39842308da326172eb54672056f90a050.tar.xz
Fix exceptions in log when rejected event is replicated
Diffstat (limited to 'synapse/app')
-rw-r--r--synapse/app/synchrotron.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/app/synchrotron.py b/synapse/app/synchrotron.py
index fa88bd12ee..03031ee34d 100644
--- a/synapse/app/synchrotron.py
+++ b/synapse/app/synchrotron.py
@@ -48,7 +48,7 @@ from synapse.replication.slave.storage.receipts import SlavedReceiptsStore
 from synapse.replication.slave.storage.registration import SlavedRegistrationStore
 from synapse.replication.slave.storage.room import RoomStore
 from synapse.replication.tcp.client import ReplicationClientHandler
-from synapse.replication.tcp.streams.events import EventsStreamEventRow
+from synapse.replication.tcp.streams.events import EventsStreamEventRow, EventsStreamRow
 from synapse.rest.client.v1 import events
 from synapse.rest.client.v1.initial_sync import InitialSyncRestServlet
 from synapse.rest.client.v1.room import RoomInitialSyncRestServlet
@@ -379,7 +379,14 @@ class SyncReplicationHandler(ReplicationClientHandler):
                 for row in rows:
                     if row.type != EventsStreamEventRow.TypeId:
                         continue
-                    event = await self.store.get_event(row.data.event_id)
+                    assert isinstance(row, EventsStreamRow)
+
+                    event = await self.store.get_event(
+                        row.data.event_id, allow_rejected=True
+                    )
+                    if event.rejected_reason:
+                        continue
+
                     extra_users = ()
                     if event.type == EventTypes.Member:
                         extra_users = (event.state_key,)