stefan-egli commented on code in PR #956:
URL: https://github.com/apache/jackrabbit-oak/pull/956#discussion_r1221570287
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGCRecommendations.java:
##########
@@ -101,6 +108,22 @@ public VersionGCRecommendations(long maxRevisionAgeMs,
Checkpoints checkpoints,
TimeInterval scope = new TimeInterval(oldestPossible, Long.MAX_VALUE);
scope = scope.notLaterThan(keep.fromMs);
+ detailedGCTimestamp =
settings.get(SETTINGS_COLLECTION_DETAILED_GC_TIMESTAMP_PROP);
+ if (detailedGCTimestamp == 0) {
+ if (log.isDebugEnabled()) {
+ log.debug("No detailedGCTimestamp found, querying for the
oldest deletedOnce candidate");
+ }
+ oldestPossibleFullGC = vgc.getOldestModifiedTimestamp(clock) - 1;
+ if (log.isDebugEnabled()) {
+ log.debug("detailedGCTimestamp found: {}",
Utils.timestampToString(oldestPossibleFullGC));
+ }
+ } else {
+ oldestPossibleFullGC = detailedGCTimestamp - 1;
+ }
+
+ TimeInterval fullGCTimeInternal = new
TimeInterval(oldestPossibleFullGC, MAX_VALUE);
Review Comment:
`TimeInterval` here expects milliseconds - however in the current version of
the code `oldestPossibleFullGC` is seconds - as it comes from
`getOldestModifiedTimestamp` which is based on `_modified`.
I would suggest to use milliseconds consistently.
--
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]