nickva opened a new issue, #5867:
URL: https://github.com/apache/couchdb/issues/5867

   ### Provide a brief overview of what the new feature is all about
   
   Currently the `since_seq` replication parameter forces a replication job to 
start from the given `since_seq` sequence ignoring the checkpoints. That's its 
intended behavior but it only works well until the first time the replication 
checkpoints. After it checkpoints, and the job restarts, those later 
checkpoints will be ignored and the job will again restart from since_seq. So a 
job with a since_seq parameter will always replay the whole changes feed since 
the starting `since_seq` parameter, and what's worse, clobber and rewind the 
replication checkpoints in the process as well.
   
   ### Tell us how the new feature should work. Be specific
   
   A better behavior might be to check the pending changes count with the 
checkpointed sequence (or 0 if there are none) and the since_seq, and use the 
one which has fewer pending changes. This way if a user sets and forgets a 
since_seq, the replication will start from the since_seq value they set if 
that's later than the last checkpointed sequence. Replication will then make 
some progress and make new checkpoints and later start using those newer 
checkpoints.
   
   If a user really wants to reset the replication back they can still do it, 
by deleting the replication checkpoints on both source and target, and set an 
arbitrary since_seq. On startup since the replication checkpoints were reset 
they will have the largest pending count so since_seq will be used.
   
   ### Not required. Suggest how to implement the addition or change
   
   _No response_
   
   ### Additional Context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to