stefan-egli commented on code in PR #1397:
URL: https://github.com/apache/jackrabbit-oak/pull/1397#discussion_r1549228836


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java:
##########
@@ -1770,6 +1770,21 @@ public void removeGarbage(final VersionGCStats stats) {
                         // fix for sonar : converted to long before operation
                         
detailedGCStats.documentsUpdateSkipped((long)oldDocs.size() - updatedDocs);
                     }
+                } else {
+                    // collect approx stats only in case of dryRun by assuming 
everything would succeed
+
+                    // for deleted properties, oldRevs & unmergedBC
+                    stats.updatedDetailedGCDocsCount += updateOpList.size();
+                    stats.deletedPropsCount += 
deletedPropsCountMap.values().stream().reduce(0, Integer::sum);
+                    stats.deletedInternalPropsCount += 
deletedInternalPropsCountMap.values().stream().reduce(0, Integer::sum);
+                    stats.deletedPropRevsCount += 
deletedPropRevsCountMap.values().stream().reduce(0, Integer::sum);
+                    stats.deletedInternalPropRevsCount += 
deletedInternalPropRevsCountMap.values().stream().reduce(0, Integer::sum);
+                    stats.deletedUnmergedBCCount += 
deletedUnmergedBCSet.size();
+
+                    // for orphan nodes.
+                    stats.updatedDetailedGCDocsCount += 
orphanOrDeletedRemovalMap.size();
+                    stats.deletedDocGCCount += 
orphanOrDeletedRemovalMap.size();
+//                    stats.deletedOrphanNodesCount += 
orphanOrDeletedRemovalMap.size();

Review Comment:
   Unless there's a reason to keep this comment, I would probably remove it. Or 
is the idea to introduce a separate orphan count?



-- 
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: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to