From 9bac5d62b33f34c25bed27824a12d697b8b6b163 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 27 May 2020 11:44:19 +0100 Subject: [PATCH] Ensure ReplicationStreamer is always started when replication enabled. (#7579) Fixes #7566. --- changelog.d/7579.bugfix | 1 + synapse/replication/tcp/handler.py | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/7579.bugfix diff --git a/changelog.d/7579.bugfix b/changelog.d/7579.bugfix new file mode 100644 index 000000000..54542b602 --- /dev/null +++ b/changelog.d/7579.bugfix @@ -0,0 +1 @@ +Fix bug where `ReplicationStreamer` was not always started when replication was enabled. Bug introduced in v1.14.0rc1. diff --git a/synapse/replication/tcp/handler.py b/synapse/replication/tcp/handler.py index 03300e533..cbcf46f3a 100644 --- a/synapse/replication/tcp/handler.py +++ b/synapse/replication/tcp/handler.py @@ -159,6 +159,9 @@ class ReplicationCommandHandler: hs.config.redis_port, ) + # First let's ensure that we have a ReplicationStreamer started. + hs.get_replication_streamer() + # We need two connections to redis, one for the subscription stream and # one to send commands to (as you can't send further redis commands to a # connection after SUBSCRIBE is called).