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

thomasm 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 703f54a155 OAK-11055 Warnings 'falling back to classic diff' fill the 
log (#1665)
703f54a155 is described below

commit 703f54a155e24fb5c24a1e66113cfa6b5820e1a9
Author: Thomas Mueller <[email protected]>
AuthorDate: Tue Aug 27 13:57:55 2024 +0200

    OAK-11055 Warnings 'falling back to classic diff' fill the log (#1665)
    
    * OAK-11055 Warnings 'falling back to classic diff' fill the log
    
    * Update 
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
    
    Co-authored-by: stefan-egli <[email protected]>
    
    ---------
    
    Co-authored-by: stefan-egli <[email protected]>
---
 .../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..5283f9a03f 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 : " + 
e.getMessage());
+                } else {
+                    LOG.warn("diffJournalChildren failed with " +
+                            e.getClass().getSimpleName() +
+                            ", falling back to classic diff", e);
+                }
             }
         }
         if (diff == null) {

Reply via email to