diff options
author | Erik Johnston <erik@matrix.org> | 2023-01-17 09:58:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 09:58:22 +0000 |
commit | 316590d1ea273115a9e7925236e02d577a231de4 (patch) | |
tree | 3ed7e2ce51e5af2c684f4c7f3d4699a0d4568572 /synapse/replication | |
parent | Merge device list replication streams (#14833) (diff) | |
download | synapse-316590d1ea273115a9e7925236e02d577a231de4.tar.xz |
Fix bug in `wait_for_stream_position` (#14856)
We were incorrectly checking if the *local* token had been advanced, rather than the token for the remote instance. In practice, I don't think this has caused any bugs due to where we use `wait_for_stream_position`, as critically we don't use it on instances that also write to the given streams (and so the local token will lag behind all remote tokens).
Diffstat (limited to 'synapse/replication')
-rw-r--r-- | synapse/replication/tcp/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/replication/tcp/client.py b/synapse/replication/tcp/client.py index 31022ce5fb..322d695bc7 100644 --- a/synapse/replication/tcp/client.py +++ b/synapse/replication/tcp/client.py @@ -325,7 +325,7 @@ class ReplicationDataHandler: # anyway in that case we don't need to wait. return - current_position = self._streams[stream_name].current_token(self._instance_name) + current_position = self._streams[stream_name].current_token(instance_name) if position <= current_position: # We're already past the position return |