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

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

commit 73ad5a5468d751feff6d288104e300e8d0ff0869
Author: Thomas Mueller <[email protected]>
AuthorDate: Thu Aug 22 14:35:03 2024 +0200

    OAK-11055 Warnings 'falling back to classic diff' fill the log
---
 .../oak/plugins/document/DocumentNodeStore.java           | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
index 5c4b5e59b9..4e2892f1fc 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
@@ -3405,9 +3405,18 @@ public final class DocumentNodeStore
                 fromRev = from.getRootRevision();
                 toRev = to.getRootRevision();
             } catch (RuntimeException e) {
-                LOG.warn("diffJournalChildren failed with " +
-                        e.getClass().getSimpleName() +
-                        ", falling back to classic diff", e);
+                // avoid filling the log file with stack traces for a known 
issue
+                // see OAK-6016 and OAK-6011
+                if (e instanceof IllegalStateException &&
+                        "Root document does not have a lastRev entry for local 
clusterId 0".equals(e.getMessage())) {
+                    LOG.warn("diffJournalChildren failed with " +
+                            e.getClass().getSimpleName() +
+                            ", falling back to classic diff");
+                } else {
+                    LOG.warn("diffJournalChildren failed with " +
+                            e.getClass().getSimpleName() +
+                            ", falling back to classic diff", e);
+                }
             }
         }
         if (diff == null) {

Reply via email to