[ https://issues.apache.org/jira/browse/OAK-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15929993#comment-15929993 ]
Stefan Eissing commented on OAK-4780: ------------------------------------- bq. VersionGarbageCollector.reset() can be simplified with just the remove() call. It will be a noop if the document doesn't exist. ack. bq. Can you please add tests for TimeInterval? You mean the class itself or special VersionGarbageCollector tests? I assume the former. bq. Did you consider moving the new set methods on VersionGarbageCollector to a new class (e.g. VersionGCOptions) and pass it as an argument to gc()? I think with the current patch it is possible to influence a running GC by calling one of those set methods. That is true. Will add some such immutable options object that is part of an active run. bq. What is the TODO about in VersionGCStats.addRun()? At the end of all iterations, the VersionGarbageCollector returns a VersionGCStats that accumulates data from all iterations made. Only the stopwatches are currently not, as Stopwatch lacks methods to add time from other watches. And re-using the same instances in each iteration will show the incorrect data for each iteration. bq. Usage of LimitExceededException from javax.naming is a bit funky but I guess you didn't want to invent yet another exception class ;-) Will add a new internal exception class. bq. VersionGarbageCollector.delayOnModification() should use Clock.waitUntil(). This allows to write efficient tests with a virtual clock. ack. bq. Only minor: the diff for VersionGarbageCollector also contains a couple of indentation changes for anonymous inner classes, which are unrelated to this improvement. I will cleanup the diffs before attaching them here. Idea is sometimes overeager to reformat things. bq. In MongoVersionGCSupport.getDeletedOnceCount(): ReadPreference.nearest().secondaryPreferred(). You cannot have both nearest and secondaryPreferred. The class will always give you a secondaryPreferred ReadPreference. ack. will change. bq. Minor: some unused imports in VersionGCSupport ack. > VersionGarbageCollector should be able to run incrementally > ----------------------------------------------------------- > > Key: OAK-4780 > URL: https://issues.apache.org/jira/browse/OAK-4780 > Project: Jackrabbit Oak > Issue Type: Task > Components: core, documentmk > Reporter: Julian Reschke > Attachments: leafnodes.diff, leafnodes-v2.diff, leafnodes-v3.diff > > > Right now, the documentmk's version garbage collection runs in several phases. > It first collects the paths of candidate nodes, and only once this has been > successfully finished, starts actually deleting nodes. > This can be a problem when the regularly scheduled garbage collection is > interrupted during the path collection phase, maybe due to other maintenance > tasks. On the next run, the number of paths to be collected will be even > bigger, thus making it even more likely to fail. > We should think about a change in the logic that would allow the GC to run in > chunks; maybe by partitioning the path space by top level directory. -- This message was sent by Atlassian JIRA (v6.3.15#6346)