stefan-egli commented on code in PR #1377:
URL: https://github.com/apache/jackrabbit-oak/pull/1377#discussion_r1540935354
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java:
##########
@@ -1639,16 +1640,37 @@ public void removeGarbage(final VersionGCStats stats) {
update.getId());
continue;
}
+ NodeState traversedParent = null;
+ NodeState traversedState = root;
+ for (String name : oldDoc.getPath().elements()) {
+ traversedParent = traversedState;
+ traversedState = traversedState.getChildNode(name);
+ }
+
NodeDocument newDoc = Collection.NODES.newDocument(ds);
oldDoc.deepCopy(newDoc);
UpdateUtils.applyChanges(newDoc, update);
- if (!verify(oldDoc, newDoc, update)) {
+ // for the time being, verify both with classic and
traversed
+ if (!verifyViaTraversedState(traversedState,
traversedParent,
+ newDoc)) {
// verification failure
// let's skip this document
it.remove();
stats.skippedDetailedGCDocsCount++;
}
};
+ for (Entry<String, Long> e :
orphanOrDeletedRemovalMap.entrySet()) {
+ NodeState traversedState = root;
+ for (String name :
Path.fromString(Utils.getPathFromId(e.getKey())).elements()) {
+ traversedState = traversedState.getChildNode(name);
+ }
+ if (!verifyDeletion(traversedState)) {
+ // verification failure
+ // let's skip this document
+ it.remove();
Review Comment:
+1, added
https://github.com/apache/jackrabbit-oak/pull/1377/commits/5b668577a5712f48fa569d998e99ae3fc302c362
--
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]