Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6294

The "missing" node cache value breaks the DocumentNodeStore#applyChanges

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.10
    • 1.7.2, 1.8.0, 1.4.22, 1.6.13
    • documentmk
    • None

    Description

      In the DocumentNodeStore#nodeCache, the special object missing is being used to mark the node entries that don't exists in the repository.

      This object should be unwrapped to null every time we call nodeCache#getIfPresent() method. It's not the case in the applyChanges() method - as a result, we may get a NPE (since the missing.getLastRev() == null):

      Caused by: java.lang.NullPointerException: null
      	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192)
      	at org.apache.jackrabbit.oak.plugins.document.PathRev.<init>(PathRev.java:40)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.applyChanges(DocumentNodeStore.java:1171)
      	at org.apache.jackrabbit.oak.plugins.document.Commit.applyToCache(Commit.java:667)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$3.headOfQueue(DocumentNodeStore.java:674)
      	at org.apache.jackrabbit.oak.plugins.document.CommitQueue.waitUntilHeadOfQueue(CommitQueue.java:240)
      	at org.apache.jackrabbit.oak.plugins.document.CommitQueue.done(CommitQueue.java:92)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.done(DocumentNodeStore.java:668)
      

      (taken from the production instance running the Oak 1.4.10).

      //cc: Chetan Mehrotra, Marcel Reutegger, Vikas Saurabh

      Attachments

        1. OAK-6294.patch
          2 kB
          Tomek Rękawek
        2. OAK-6294-2.patch
          3 kB
          Marcel Reutegger
        3. OAK-6294-3.patch
          3 kB
          Marcel Reutegger

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tomek.rekawek Tomek Rękawek
            tomek.rekawek Tomek Rękawek
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment