This is an automated email from the ASF dual-hosted git repository. daim pushed a commit to branch OAK-10792 in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit 5d17124ecf451819e7a097bd54773f13ca1b0882 Author: Rishabh Kumar <[email protected]> AuthorDate: Wed May 15 14:47:06 2024 +0530 OAK-10792 : rename DetailedGC to FullGC --- ...atsCollector.java => FullGCStatsCollector.java} | 4 +-- ...ctorImpl.java => FullGCStatsCollectorImpl.java} | 8 ++--- .../plugins/document/VersionGCRecommendations.java | 6 ++-- .../plugins/document/VersionGarbageCollector.java | 28 +++++++-------- ...Test.java => FullGCStatsCollectorImplTest.java} | 40 +++++++++++----------- 5 files changed, 43 insertions(+), 43 deletions(-) diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollector.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollector.java similarity index 94% rename from oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollector.java rename to oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollector.java index 5bcd77209c..506fa62ce6 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollector.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollector.java @@ -21,10 +21,10 @@ package org.apache.jackrabbit.oak.plugins.document; import org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector.VersionGCStats; /** - * Collector interface for {@link DocumentNodeStore} full revision garbage collection + * Collector interface for {@link DocumentNodeStore} full garbage collection * statistics. */ -public interface FullRevisionGCStatsCollector { +public interface FullGCStatsCollector { /** * Total No. of documents read during FullGC phase diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollectorImpl.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollectorImpl.java similarity index 95% rename from oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollectorImpl.java rename to oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollectorImpl.java index c0795ffee5..64be29864c 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollectorImpl.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollectorImpl.java @@ -29,9 +29,9 @@ import static org.apache.jackrabbit.oak.stats.StatsOptions.DEFAULT; import static org.apache.jackrabbit.oak.stats.StatsOptions.METRICS_ONLY; /** - * {@link DocumentNodeStore} Detailed revision garbage collection statistics. + * {@link DocumentNodeStore} Full garbage collection statistics. */ -class FullRevisionGCStatsCollectorImpl implements FullRevisionGCStatsCollector { +class FullGCStatsCollectorImpl implements FullGCStatsCollector { static final String FULL_GC = "FullGC"; static final String READ_DOC = "READ_DOC"; @@ -70,7 +70,7 @@ class FullRevisionGCStatsCollectorImpl implements FullRevisionGCStatsCollector { private final CounterStats counter; private final CounterStats failureCounter; - FullRevisionGCStatsCollectorImpl(StatisticsProvider provider) { + FullGCStatsCollectorImpl(StatisticsProvider provider) { readDoc = meter(provider, READ_DOC); deletedOrphanNode = meter(provider, DELETED_ORPHAN_NODE); @@ -92,7 +92,7 @@ class FullRevisionGCStatsCollectorImpl implements FullRevisionGCStatsCollector { failureCounter = counter(provider, FAILURE_COUNTER); } - //---------------------< DetailedRevisionGCStatsCollector >------------------------- + //---------------------< FullGCStatsCollector >------------------------- @Override public void documentRead() { diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGCRecommendations.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGCRecommendations.java index dff2f6f66b..5f00b960c2 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGCRecommendations.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGCRecommendations.java @@ -228,9 +228,9 @@ public class VersionGCRecommendations { scope = gcResult.gcScope; ignoreDueToCheckPoint = gcResult.ignoreGC; - final GCResult detailGCResult = getResult(options, checkpoint, clock, DGC, scopeFullGC); - scopeFullGC = detailGCResult.gcScope; - ignoreFullGCDueToCheckPoint = detailGCResult.ignoreGC; + final GCResult fullGCResult = getResult(options, checkpoint, clock, DGC, scopeFullGC); + scopeFullGC = fullGCResult.gcScope; + ignoreFullGCDueToCheckPoint = fullGCResult.ignoreGC; if (scope.getDurationMs() <= options.precisionMs) { // If we have narrowed the collect time interval down as much as we can, no diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java index e83e1c9e0c..cc1abb46ed 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java @@ -146,22 +146,22 @@ public class VersionGarbageCollector { static final String SETTINGS_COLLECTION_REC_INTERVAL_PROP = "recommendedIntervalMs"; /** - * Property name to timestamp till when last detailed-GC run happened + * Property name to timestamp till when last full-GC run happened */ static final String SETTINGS_COLLECTION_FULL_GC_TIMESTAMP_PROP = "fullGCTimeStamp"; /** - * Property name to _id till when last detailed-GC run happened + * Property name to _id till when last full-GC run happened */ static final String SETTINGS_COLLECTION_FULL_GC_DOCUMENT_ID_PROP = "fullGCId"; /** - * Property name to timestamp till when last detailed-GC run happened in dryRun mode only + * Property name to timestamp till when last full-GC run happened in dryRun mode only */ static final String SETTINGS_COLLECTION_FULL_GC_DRY_RUN_TIMESTAMP_PROP = "fullGCDryRunTimeStamp"; /** - * Property name to _id till when last detailed-GC run happened in dryRun mode only + * Property name to _id till when last full-GC run happened in dryRun mode only */ static final String SETTINGS_COLLECTION_FULL_GC_DRY_RUN_DOCUMENT_ID_PROP = "fullGCDryRunId"; @@ -221,7 +221,7 @@ public class VersionGarbageCollector { private VersionGCOptions options; private GCMonitor gcMonitor = GCMonitor.EMPTY; private RevisionGCStats gcStats = new RevisionGCStats(NOOP); - private FullRevisionGCStatsCollector fullGCStats = new FullRevisionGCStatsCollectorImpl(NOOP); + private FullGCStatsCollector fullGCStats = new FullGCStatsCollectorImpl(NOOP); VersionGarbageCollector(DocumentNodeStore nodeStore, VersionGCSupport gcSupport, @@ -240,7 +240,7 @@ public class VersionGarbageCollector { void setStatisticsProvider(StatisticsProvider provider) { this.gcStats = new RevisionGCStats(provider); - this.fullGCStats = new FullRevisionGCStatsCollectorImpl(provider); + this.fullGCStats = new FullGCStatsCollectorImpl(provider); } @NotNull @@ -756,7 +756,7 @@ public class VersionGarbageCollector { stats.fullGCActive.start(); if (rec.ignoreFullGCDueToCheckPoint) { phases.stats.ignoredFullGCDueToCheckPoint = true; - monitor.skipped("Checkpoint prevented detailed revision garbage collection"); + monitor.skipped("Checkpoint prevented Full garbage collection"); } else { final RevisionVector headRevision = nodeStore.getHeadRevision(); monitor.info("Looking at revisions in {} for full GC", rec.scopeFullGC); @@ -789,12 +789,12 @@ public class VersionGarbageCollector { } /** - * "Detailed garbage" refers to additional garbage identified as part of OAK-10199 + * "Full garbage" refers to additional garbage identified as part of OAK-10199 * et al: essentially garbage that in earlier versions of Oak were ignored. This * includes: deleted properties, revision information within documents, branch * commit related garbage. * <p> - * The "detailed garbage" collector can be instructed to do a full repository scan + * The "Full garbage" collector can be instructed to do a full repository scan * - or incrementally based on where it last left off. When doing a full * repository scan (but not limited to that), it executes in (small) batches * followed by voluntary paused (aka throttling) to avoid excessive load on the @@ -845,7 +845,7 @@ public class VersionGarbageCollector { } docsTraversed++; if (docsTraversed % 100 == 0) { - monitor.info("Iterated through {} documents so far. {} had detailed garbage", docsTraversed, gc.getGarbageCount()); + monitor.info("Iterated through {} documents so far. {} had Full garbage", docsTraversed, gc.getGarbageCount()); } lastDoc = doc; @@ -1072,7 +1072,7 @@ public class VersionGarbageCollector { } fullGCStats.documentRead(); - monitor.info("Collecting Detailed Garbage for doc [{}]", doc.getId()); + monitor.info("Collecting Full Garbage for doc [{}]", doc.getId()); if (AUDIT_LOG.isTraceEnabled()) { AUDIT_LOG.trace("<Collecting> Garbage in doc [{}]", doc.getId()); @@ -1474,7 +1474,7 @@ public class VersionGarbageCollector { // to know whether the node is actually deleted, would potentially // require several commit value lookups. - // in order to keep the execution time of detailGC in this regard small, + // in order to keep the execution time of fullGC in this regard small, // the code here stops with any further checks and just sets // "_deletedOnce" to true and updates "_modified" - the DeletedDocsGC // later would either resurrect or delete the document properly (eg @@ -1822,7 +1822,7 @@ public class VersionGarbageCollector { if (updateOpList.isEmpty() && orphanOrDeletedRemovalMap.isEmpty()) { if (log.isDebugEnabled() || isFullGCDryRun) { - log.debug("Skipping removal of detailed garbage, cause no garbage detected"); + log.debug("Skipping removal of Full garbage, cause no garbage detected"); } return; } @@ -1836,7 +1836,7 @@ public class VersionGarbageCollector { } if (cancel.get()) { - log.info("Aborting the removal of detailed garbage since RGC had been cancelled"); + log.info("Aborting the removal of Full garbage since RGC had been cancelled"); return; } diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollectorImplTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollectorImplTest.java similarity index 75% rename from oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollectorImplTest.java rename to oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollectorImplTest.java index 08e1d5db89..6c46684749 100644 --- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/FullRevisionGCStatsCollectorImplTest.java +++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollectorImplTest.java @@ -34,33 +34,33 @@ import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.apache.commons.lang3.reflect.FieldUtils.readField; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.COLLECT_DELETED_OLD_REVS_TIMER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.COLLECT_DELETED_PROPS_TIMER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.COLLECT_FULL_GC_TIMER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.COLLECT_ORPHAN_NODES_TIMER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.COLLECT_UNMERGED_BC_TIMER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.COUNTER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.DELETED_ORPHAN_NODE; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.DELETED_PROPERTY; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.DELETED_UNMERGED_BC; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.DELETE_FULL_GC_DOCS_TIMER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.FULL_GC; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.FULL_GC_ACTIVE_TIMER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.FULL_GC_TIMER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.FAILURE_COUNTER; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.READ_DOC; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.SKIPPED_DOC; -import static org.apache.jackrabbit.oak.plugins.document.FullRevisionGCStatsCollectorImpl.UPDATED_DOC; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.COLLECT_DELETED_OLD_REVS_TIMER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.COLLECT_DELETED_PROPS_TIMER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.COLLECT_FULL_GC_TIMER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.COLLECT_ORPHAN_NODES_TIMER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.COLLECT_UNMERGED_BC_TIMER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.COUNTER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.DELETED_ORPHAN_NODE; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.DELETED_PROPERTY; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.DELETED_UNMERGED_BC; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.DELETE_FULL_GC_DOCS_TIMER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.FULL_GC; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.FULL_GC_ACTIVE_TIMER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.FULL_GC_TIMER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.FAILURE_COUNTER; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.READ_DOC; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.SKIPPED_DOC; +import static org.apache.jackrabbit.oak.plugins.document.FullGCStatsCollectorImpl.UPDATED_DOC; import static org.junit.Assert.assertEquals; /** - * Unit Cases for {@link FullRevisionGCStatsCollectorImpl} + * Unit Cases for {@link FullGCStatsCollectorImpl} */ -public class FullRevisionGCStatsCollectorImplTest { +public class FullGCStatsCollectorImplTest { private final ScheduledExecutorService executor = newSingleThreadScheduledExecutor(); private final MetricStatisticsProvider statsProvider = new MetricStatisticsProvider(getPlatformMBeanServer(), executor); - private final FullRevisionGCStatsCollectorImpl stats = new FullRevisionGCStatsCollectorImpl(statsProvider); + private final FullGCStatsCollectorImpl stats = new FullGCStatsCollectorImpl(statsProvider); @After public void shutDown(){
