nickva commented on PR #6138: URL: https://github.com/apache/couchdb/pull/6138#issuecomment-5915499395
> This branch is actually closer to the mrview shape, where the purge phase only removes documents from the index, and the changes phase re-adds the ones that still exist. What mrview does is not always correct. Looking at this PR made me look back at mrview and see how it handles purges. I think we have bug there currently: https://github.com/apache/couchdb/pull/6140 (see https://github.com/apache/couchdb/issues/6139 for a bash script to demonstrate the problem). There are basically a few cases to worry about for all 3 indexers we have: 1) purge non-leaf / non-existent rev, index doesn't change 2) purge leaf but non-winning revision, index doesn't change 3) purge all leafs, the whole fdi is gone, at least one leaf was not-deleted: index is updated 4) purge all leafs the whole fdi is gone, all the leafs were deleted (not part of the index): index doesn't change 5) purge winning revision, other revisions left (there is a new winner): index is updated "index doesn't change" here is that we don't need to update index entries, the index will still process the changes feed and update it's latest seen update and purge sequences. -- 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]
