summary refs log tree commit diff
path: root/synapse/replication
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-05-11 11:26:12 +0100
committerErik Johnston <erik@matrix.org>2020-05-14 17:25:42 +0100
commitd263a4de0299d69ca937634a99076ff69df8dc60 (patch)
tree1b99d66814a2579bb17b4ab4b431898689f56a43 /synapse/replication
parentUse new writers config (diff)
downloadsynapse-d263a4de0299d69ca937634a99076ff69df8dc60.tar.xz
Enable moving event persistence off of master
Diffstat (limited to 'synapse/replication')
-rw-r--r--synapse/replication/tcp/handler.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/replication/tcp/handler.py b/synapse/replication/tcp/handler.py

index acfa66a7a8..ee4b978a5a 100644 --- a/synapse/replication/tcp/handler.py +++ b/synapse/replication/tcp/handler.py
@@ -38,7 +38,9 @@ from synapse.replication.tcp.commands import ( from synapse.replication.tcp.protocol import AbstractConnection from synapse.replication.tcp.streams import ( STREAMS_MAP, + BackfillStream, CachesStream, + EventsStream, FederationStream, Stream, ) @@ -87,6 +89,12 @@ class ReplicationCommandHandler: self._streams_to_replicate.append(stream) continue + if ( + isinstance(stream, (EventsStream, BackfillStream)) + and hs.config.worker.writers.events == hs.get_instance_name() + ): + self._streams_to_replicate.append(stream) + # Only add any other streams if we're on master. if hs.config.worker_app is not None: continue