Skip to content

Commit

Permalink
Drop support for redis.dbid (matrix-org#7450)
Browse files Browse the repository at this point in the history
Since we only use pubsub, the dbid is irrelevant.
  • Loading branch information
richvdh authored and phil-flex committed Jun 16, 2020
1 parent 0399642 commit 6159b4d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/7450.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for running replication over Redis when using workers.
1 change: 0 additions & 1 deletion synapse/config/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
4 changes: 1 addition & 3 deletions synapse/replication/tcp/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
)
Expand Down

0 comments on commit 6159b4d

Please sign in to comment.