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

Read-only DocumentNodeStore tries to create root document

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.10.3, 1.14.0, 1.8.14
    • Component/s: documentmk
    • Labels:
      None

      Description

      When connecting a read-only DocumentNodeStore to a DocumentStore with an empty nodes collection, the DocumentNodeStore tries to create the root document. The operation then fails with something like:

      Exception in thread "main" org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: Method - createOrUpdate. Params: [nodes, [key: 0:/ new {_deleted.r16a020ebbbf-0-0=SET_MAP_ENTRY false, _commitRoot.r16a020ebbbf-0-0=SET_MAP_ENTRY 0, _modified=MAX 1554812680}]]
              at org.apache.jackrabbit.oak.plugins.document.DocumentStoreException.asDocumentStoreException(DocumentStoreException.java:179)
              at org.apache.jackrabbit.oak.plugins.document.DocumentStoreException.convert(DocumentStoreException.java:131)
              at org.apache.jackrabbit.oak.plugins.document.DocumentStoreException.convert(DocumentStoreException.java:114)
              at org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:425)
              at org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStoreWithTiming(Commit.java:280)
              at org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:264)
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.<init>(DocumentNodeStore.java:624)
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.build(DocumentNodeStoreBuilder.java:174)
              at org.apache.jackrabbit.oak.run.ClusterNodesCommand.execute(ClusterNodesCommand.java:65)
              at org.apache.jackrabbit.oak.run.Main.main(Main.java:49)
      Caused by: java.lang.UnsupportedOperationException: Method - createOrUpdate. Params: [nodes, [key: 0:/ new {_deleted.r16a020ebbbf-0-0=SET_MAP_ENTRY false, _commitRoot.r16a020ebbbf-0-0=SET_MAP_ENTRY 0, _modified=MAX 1554812680}]]
              at org.apache.jackrabbit.oak.plugins.document.util.ReadOnlyDocumentStoreWrapperFactory$1.invoke(ReadOnlyDocumentStoreWrapperFactory.java:38)
              at com.sun.proxy.$Proxy0.createOrUpdate(Unknown Source)
              at org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:365)
              ... 6 more
      

        Attachments

        1. OAK-8207-1.8.diff
          3 kB
          Julian Reschke

          Activity

            People

            • Assignee:
              mreutegg Marcel Reutegger
              Reporter:
              mreutegg Marcel Reutegger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: