This is an automated email from the ASF dual-hosted git repository.

joscorbe pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 869a2f9cf0 Oak 11772: added check for fullGCEnabled when updating 
fullGC checkpoints in MongoDB (#2344)
869a2f9cf0 is described below

commit 869a2f9cf0ba13eed84b3fa98cac45bee58549e6
Author: horia_poradici <[email protected]>
AuthorDate: Sat Jun 21 12:22:54 2025 +0300

    Oak 11772: added check for fullGCEnabled when updating fullGC checkpoints 
in MongoDB (#2344)
---
 .../oak/plugins/document/VersionGCRecommendations.java         | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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 3d92e4e144..f991d52c59 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
@@ -276,10 +276,12 @@ public class VersionGCRecommendations {
             // success, we would not expect to encounter revisions older than 
this in the future
             setVGCSetting(SETTINGS_COLLECTION_OLDEST_TIMESTAMP_PROP, 
scope.toMs);
 
-            final Map<String, Object> updateVGCMap = new HashMap<>();
-            updateVGCMap.put(SETTINGS_COLLECTION_FULL_GC_TIMESTAMP_PROP, 
stats.oldestModifiedDocTimeStamp);
-            updateVGCMap.put(SETTINGS_COLLECTION_FULL_GC_DOCUMENT_ID_PROP, 
stats.oldestModifiedDocId);
-            updateVGCSetting(updateVGCMap);
+            if (fullGCEnabled) {
+                final Map<String, Object> updateVGCMap = new HashMap<>();
+                updateVGCMap.put(SETTINGS_COLLECTION_FULL_GC_TIMESTAMP_PROP, 
stats.oldestModifiedDocTimeStamp);
+                updateVGCMap.put(SETTINGS_COLLECTION_FULL_GC_DOCUMENT_ID_PROP, 
stats.oldestModifiedDocId);
+                updateVGCSetting(updateVGCMap);
+            }
 
             int count = stats.deletedDocGCCount - stats.deletedLeafDocGCCount;
             double usedFraction;

Reply via email to