nickva commented on code in PR #5881:
URL: https://github.com/apache/couchdb/pull/5881#discussion_r2775132606


##########
src/couch_replicator/src/couch_replicator_scheduler_job.erl:
##########
@@ -685,7 +685,12 @@ init_state(Rep) ->
     Stats = couch_replicator_stats:max_stats(ArgStats1, HistoryStats),
 
     StartSeq1 = get_value(since_seq, Options, StartSeq0),
-    StartSeq = {0, StartSeq1},
+    StartSeq2 =

Review Comment:
   We can't in general compare sequences. But we can compare with 0 if we're 
starting from scratch. We should use == 0. 
   
   Based on the discussion in https://github.com/apache/couchdb/issues/5867 
we'd want something like this:
   
   If there is a checkpoint (StartSeq0 =/= 0) use the checkpoint and ignore 
since_seq. Otherwise (no checkpoint) and user specified a since_seq, use the 
since_seq
   
   In addition make sure the since_seq is folded into the replication ID 
(append to the list if it's there but if it isn't make sure to generate the 
same replication ID as before). This _will_ rewind changes for a existing 
replications with since_seq back to 0. So it's something to warn the users 
about in the release notes. 



-- 
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