diff options
author | Richard van der Hoff <richard@matrix.org> | 2019-03-27 15:18:28 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2019-03-27 22:07:05 +0000 |
commit | 1f6d6f918a57183083c2dd1bba6179373102b918 (patch) | |
tree | 8776165726ad00fd8d57a24c17cc224735a58ea4 /synapse/replication/slave/storage | |
parent | changelog (diff) | |
download | synapse-1f6d6f918a57183083c2dd1bba6179373102b918.tar.xz |
Make EventStream rows have a type
... as a precursor to combining it with the CurrentStateDelta stream.
Diffstat (limited to 'synapse/replication/slave/storage')
-rw-r--r-- | synapse/replication/slave/storage/events.py | 8 |
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": |