Ok I think I got it: the FileStore.fullGC() runs the GC on the segment store, while the *MarkSweepGarbageCollector.collectGarbage *runs it on the BlobStore. But I still have one question: I can check the segment store GC status defining a *GCMonitor*, but how do I check the blob GC status? The only method I found is *getStats* but returns something only if the repository is shared..
Marco. On Mon, Jul 9, 2018 at 3:30 PM Marco Piovesana <[email protected]> wrote: > Hi all, > I have a standalone Oak repository based on a SegmentNodeStore: > > File repositoryFile = new File(rootDir, "repository"); > File dataStoreFile = new File(rootDir, "datastore"); > BlobStore blobStore = new FileBlobStore(dataStoreFile.getAbsolutePath()); > FileStore fileStore = > FileStoreBuilder.fileStoreBuilder(repositoryFile).withBlobStore(blobStore).build(); > NodeStore nodeStore = SegmentNodeStoreBuilders.builder(fileStore).build(); > Jcr jcr = new Jcr(nodeStore); > Repository repository = jcr.createRepository(); > > I need to run the garbage collector but after reading both documentation > and tests I still have some doubts on how to run it. > > Should I use call the method *fullGC()* of *FileStore*? Or should I > instantiate a *MarkSweepGarbageCollector* and run its *collectGarbage* > method? > > Another question: for a Document node store I have to run Revision GC and > Blob GC. For the Segment node store I just need to run one of the two > methods mentioned before(fullGC or collectGarbage)? > > Marco. >
