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

Version restore fails if restore would not change bundling root but changes bundled nodes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.7.1, 1.6.2, 1.8.0
    • Component/s: documentmk
    • Labels:
      None

      Description

      Following test case in VersionedDocumentBundlingTest fails:

          @Test
          public void restoreVersionedNode() throws Exception{
              String assetParentPath = "/bundlingtest/par";
              Node asset = JcrUtils.getOrCreateByPath(assetParentPath + "/foo.png", "oak:Unstructured", "oak:Asset", s, false);
              Node assetParent = s.getNode(assetParentPath);
              assetParent.addMixin(JcrConstants.MIX_VERSIONABLE);
              asset.addNode("jcr:content", "oak:Unstructured");
              s.save();
      
              VersionManager vm = s.getWorkspace().getVersionManager();
              Version version = vm.checkin(assetParentPath);
              vm.checkout(assetParentPath);
      
              asset.getNode("jcr:content").setProperty("foo1", "bar1");
              s.save();
      
              vm.restore(version, true);
          }
      
      

      The important point that needs to happen is that restore process needs to let bundle-root-node (/bundlingtest/par/foo.png) untouched BUT needs to change a bundled node (/bundlingtest/par/foo.png/jcr:content).

        Attachments

        1. OAK-6267-v1.patch
          4 kB
          Chetan Mehrotra

          Activity

            People

            • Assignee:
              chetanm Chetan Mehrotra
              Reporter:
              catholicon Vikas Saurabh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: