stefan-egli commented on code in PR #1328: URL: https://github.com/apache/jackrabbit-oak/pull/1328#discussion_r1504290603
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java: ########## @@ -1053,6 +1053,28 @@ private void collectUnmergedBranchCommits(final NodeDocument doc, final GCPhases phases.stop(GCPhase.DETAILED_GC_COLLECT_UNMERGED_BC); } + private void collectOldRevisions(final NodeDocument doc, final GCPhases phases, final UpdateOp updateOp, + final long toModifiedMs) { + if (phases.start(GCPhase.DETAILED_GC_COLLECT_OLD_REVS)){ + // Identify the revisions that can be removed + final Set<Revision> oldRevisions = doc.getLocalRevisions().keySet().stream() + .filter(rev -> isRevisionOlderThan(rev, toModifiedMs)) + .collect(toSet()); + + if (oldRevisions.isEmpty()) { + phases.stop(GCPhase.DETAILED_GC_COLLECT_OLD_REVS); + return; + } + + + + + + Review Comment: ```suggestion ``` -- 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