diff --git a/synapse/storage/databases/main/events_worker.py b/synapse/storage/databases/main/events_worker.py index e39d4b96242..d246a828851 100644 --- a/synapse/storage/databases/main/events_worker.py +++ b/synapse/storage/databases/main/events_worker.py @@ -204,7 +204,11 @@ def __init__( notifier=hs.get_replication_notifier(), stream_name="events", instance_name=hs.get_instance_name(), - tables=[("events", "instance_name", "stream_ordering")], + tables=[ + ("events", "instance_name", "stream_ordering"), + ("current_state_delta_stream", "instance_name", "stream_id"), + ("ex_outlier_stream", "instance_name", "event_stream_ordering"), + ], sequence_name="events_stream_seq", writers=hs.config.worker.writers.events, ) @@ -214,7 +218,10 @@ def __init__( notifier=hs.get_replication_notifier(), stream_name="backfill", instance_name=hs.get_instance_name(), - tables=[("events", "instance_name", "stream_ordering")], + tables=[ + ("events", "instance_name", "stream_ordering"), + ("ex_outlier_stream", "instance_name", "event_stream_ordering"), + ], sequence_name="events_backfill_stream_seq", positive=False, writers=hs.config.worker.writers.events, @@ -230,6 +237,11 @@ def __init__( "events", "stream_ordering", is_writer=hs.get_instance_name() in hs.config.worker.writers.events, + extra_tables=[ + ("ex_outlier_stream", "event_stream_ordering"), + ("current_state_delta_stream", "stream_id"), + ("ex_outlier_stream", "instance_name", "event_stream_ordering"), + ], ) self._backfill_id_gen = StreamIdGenerator( db_conn,