summary refs log tree commit diff
path: root/synapse/replication/slave/storage
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/replication/slave/storage')
-rw-r--r--synapse/replication/slave/storage/events.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/replication/slave/storage/events.py b/synapse/replication/slave/storage/events.py
index 4830c68f35..c57385d92f 100644
--- a/synapse/replication/slave/storage/events.py
+++ b/synapse/replication/slave/storage/events.py
@@ -16,6 +16,7 @@
 import logging
 
 from synapse.api.constants import EventTypes
+from synapse.replication.tcp.streams.events import EventsStreamEventRow
 from synapse.storage.event_federation import EventFederationWorkerStore
 from synapse.storage.event_push_actions import EventPushActionsWorkerStore
 from synapse.storage.events_worker import EventsWorkerStore
@@ -79,9 +80,12 @@ class SlavedEventStore(EventFederationWorkerStore,
         if stream_name == "events":
             self._stream_id_gen.advance(token)
             for row in rows:
+                if row.type != EventsStreamEventRow.TypeId:
+                    continue
+                data = row.data
                 self.invalidate_caches_for_event(
-                    token, row.event_id, row.room_id, row.type, row.state_key,
-                    row.redacts,
+                    token, data.event_id, data.room_id, data.type, data.state_key,
+                    data.redacts,
                     backfilled=False,
                 )
         elif stream_name == "backfill":