You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by da...@apache.org on 2024/01/25 19:16:22 UTC

(jackrabbit-oak) 05/50: OAK-10584 : catch exception in getOldestRevisionToKeep when in read-only mode

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

daim pushed a commit to branch DetailedGC/OAK-10199
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 707a431d815c564172d189a006fb9a40c2b03993
Author: stefan-egli <st...@apache.org>
AuthorDate: Thu Dec 14 15:36:01 2023 +0100

    OAK-10584 : catch exception in getOldestRevisionToKeep when in read-only mode
---
 .../org/apache/jackrabbit/oak/plugins/document/Checkpoints.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Checkpoints.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Checkpoints.java
index 50c61f6da3..4624ea4835 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Checkpoints.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Checkpoints.java
@@ -146,8 +146,13 @@ class Checkpoints {
         }
 
         if (op.hasChanges()) {
-            store.findAndUpdate(Collection.SETTINGS, op);
-            LOG.debug("Purged {} expired checkpoints", op.getChanges().size());
+        	try {
+        		store.findAndUpdate(Collection.SETTINGS, op);
+        		LOG.debug("Purged {} expired checkpoints", op.getChanges().size());
+        	} catch (UnsupportedOperationException uoe) {
+        		LOG.info("getOldestRevisionToKeep : could not clean up expired checkpoints"
+        				+ " due to excepttion : " + uoe, uoe);
+        	}
         }
 
         return lastAliveRevision;