Only resync on POSITION if cmd.token != current_token
parent
84ac795e04
commit
a2e0bb9512
|
@ -161,12 +161,17 @@ class ReplicationCommandHandler:
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Fetch all updates between then and now.
|
# If the position token matches our current token then we're up to
|
||||||
limited = True
|
# date and there's nothing to do. Otherwise, fetch all updates
|
||||||
while limited:
|
# between then and now.
|
||||||
updates, current_token, limited = await stream.get_updates_since(
|
missing_updates = cmd.token != current_token
|
||||||
current_token, cmd.token
|
while missing_updates:
|
||||||
)
|
(
|
||||||
|
updates,
|
||||||
|
current_token,
|
||||||
|
missing_updates,
|
||||||
|
) = await stream.get_updates_since(current_token, cmd.token)
|
||||||
|
|
||||||
if updates:
|
if updates:
|
||||||
await self.on_rdata(
|
await self.on_rdata(
|
||||||
cmd.stream_name,
|
cmd.stream_name,
|
||||||
|
|
Loading…
Reference in New Issue