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

RepositoryUpgrade skip on error must skip non existing node bundle

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.3.16, 1.4
    • upgrade
    • None

    Description

      With OAK-2893 support was added to continue upgrade even if some issue exist with some of node to copy. That change checks for ItemStateException. However if the bundle is not present then NullPointerException is thrown which gets ignored

      Caused by: java.lang.NullPointerException: Could not load NodePropBundle for id [ae3d4171-6ece-4e95-b6e4-3f487edf794e]
          at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:236) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.BundleLoader.loadBundle(BundleLoader.java:62) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.JackrabbitNodeState.createChildNodeState(JackrabbitNodeState.java:349) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.JackrabbitNodeState.getChildNodeEntries(JackrabbitNodeState.java:320) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.nodestate.AbstractDecoratedNodeState.getChildNodeEntries(AbstractDecoratedNodeState.java:130) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier.copyNodeState(NodeStateCopier.java:187) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier.copyNodeState(NodeStateCopier.java:150) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier.access$200(NodeStateCopier.java:72) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier$Builder.copy(NodeStateCopier.java:397) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copyWorkspace(RepositoryUpgrade.java:866) ~[na:na]
          at org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:438) ~[na:na]
      

      As a fix BundleLoader should throw ItemStateException instead of NullpointerException when a NodePropBundle is missing for given id

      Attachments

        1. OAK-3979.patch
          2 kB
          Chetan Mehrotra

        Activity

          People

            jsedding Julian Sedding
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: