nickva opened a new pull request, #5930:
URL: https://github.com/apache/couchdb/pull/5930

   Currently, there are two places where the index purge seq is tracked: in the 
index and in the db local doc checkpoints. Purge sequence folding should never 
start below the value in the checkpoint document as that could raise an 
`invalid_start_purge_seq`. Normally both sequences should match, but if they 
don't try to be explicit about what should happen:
   
    * Index pseq > checkpoint pseq. Index somehow got ahead of the checkpoint. 
Use the checkpoint seq and reproces some purges through the index. This will do 
extra work but should be safe.
   
    * Index pseq < checkpoint pseq. Index somehow got behind the checkpoint and 
it looks like it could have skipped purges. For views we reset the index, and 
arguably that's the most correct solution. However, we never really had a reset 
facility for clouseau, so instead choose to emit an error log and let the user 
intervene manually but otherwise keep updating the index.
   
   When updating the purge sequence in clouseau, save an rpc call if we're not 
advancing clouseau's purge sequence. Clouseau as of recently already has a 
check to return `ok` right away if new purge_seq is somehow less or equal to 
the current one, but it's still nice not have to do an extra round-trip.
   


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