mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Make EventStream rows have a type
... as a precursor to combining it with the CurrentStateDelta stream.
This commit is contained in:
parent
a65763a5d6
commit
1f6d6f918a
4 changed files with 98 additions and 17 deletions
|
@ -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":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue