From 092b62ee7bef4f682cb26e9049af446fada4f18e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 25 Mar 2020 11:41:38 +0000 Subject: [PATCH] fixup! Thread through instance name to replication client --- synapse/replication/tcp/streams/_base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/replication/tcp/streams/_base.py b/synapse/replication/tcp/streams/_base.py index 9c93d169cb..87ab631fd4 100644 --- a/synapse/replication/tcp/streams/_base.py +++ b/synapse/replication/tcp/streams/_base.py @@ -69,6 +69,8 @@ class Stream(object): # The token from which we last asked for updates self.last_token = self.current_token() + self.local_instance_name = hs.config.worker_name or "master" + def discard_updates_and_advance(self): """Called when the stream should advance but the updates would be discarded, e.g. when there are no currently connected workers. @@ -87,7 +89,7 @@ class Stream(object): """ current_token = self.current_token() updates, current_token, limited = await self.get_updates_since( - "master", self.last_token, current_token + self.local_instance_name, self.last_token, current_token ) self.last_token = current_token