nickva opened a new pull request, #6195: URL: https://github.com/apache/couchdb/pull/6195
Stemming is done in essentially two ways: normally we walk the tree and keep a revision if any leaf under is below the revs limit, or, if the tree has duplicates (say we a fragment connect two other path fragments) repair_tree/2 rebuilds the tree from all leaf paths and in the process cuts each path to fits the revs limit. Previously, those two ways of stemming could have disagreed on results. The repair procedure could have cut-off a leaf form the ancestor, even if the ancestor would survive anyway (due to having another, shorter branch). Then we could end up with one tree shape in one or as multiple paths in another case. To fix it, let repair_tree/2 collapse duplicate by re-merging the full leaf path as it did since #6179, and then walk the result like any other tree. If duplicates cannot be collapsed (same rev id at a different position) re-throw and do the cut-per-path as before. (This issue was reported by Will Holley) -- 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]
