mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-12 21:32:15 -04:00
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).
This commit is contained in:
parent
2b084c5b71
commit
316590d1ea
3 changed files with 80 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue