From 7ad53ea6d285dedef905d3d2dafd10ae8fbe323c Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 7 May 2020 13:35:32 +0100 Subject: [PATCH] Drop support for redis.dbid Since we only use pubsub, the dbid is irrelevant. --- changelog.d/7450.feature | 1 + synapse/config/redis.py | 1 - synapse/replication/tcp/handler.py | 4 +--- 3 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 changelog.d/7450.feature diff --git a/changelog.d/7450.feature b/changelog.d/7450.feature new file mode 100644 index 000000000000..ce6140fdd111 --- /dev/null +++ b/changelog.d/7450.feature @@ -0,0 +1 @@ +Add support for running replication over Redis when using workers. diff --git a/synapse/config/redis.py b/synapse/config/redis.py index 81a27619ec7a..d5d3ca1c9e1e 100644 --- a/synapse/config/redis.py +++ b/synapse/config/redis.py @@ -31,5 +31,4 @@ def read_config(self, config, **kwargs): self.redis_host = redis_config.get("host", "localhost") self.redis_port = redis_config.get("port", 6379) - self.redis_dbid = redis_config.get("dbid") self.redis_password = redis_config.get("password") diff --git a/synapse/replication/tcp/handler.py b/synapse/replication/tcp/handler.py index b14a3d9fcaac..4328b38e9dfe 100644 --- a/synapse/replication/tcp/handler.py +++ b/synapse/replication/tcp/handler.py @@ -131,10 +131,9 @@ def start_replication(self, hs): import txredisapi logger.info( - "Connecting to redis (host=%r port=%r DBID=%r)", + "Connecting to redis (host=%r port=%r)", hs.config.redis_host, hs.config.redis_port, - hs.config.redis_dbid, ) # We need two connections to redis, one for the subscription stream and @@ -145,7 +144,6 @@ def start_replication(self, hs): outbound_redis_connection = txredisapi.lazyConnection( host=hs.config.redis_host, port=hs.config.redis_port, - dbid=hs.config.redis_dbid, password=hs.config.redis.redis_password, reconnect=True, )