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

In CompositeNodeStore, mounts are ignored when iterating through child nodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.42.0
    • 1.44.0
    • composite
    • None

    Description

      How to reproduce

      Configure CompositeNodeStore with a mount test with 2 mount paths, with one path being both longer and alphabetically lower than the other (example "/x" and "/a/b").

      The following code 

      nodeStore.getRoot().getChildNodeNames() 

      will then ignore the test mount and its "/x" node, because the current code only checks if the parent of the alphabetically first path (here "/a/b") is equal to the root path, which is false. However, this is incorrect as the "/x" path should have been considered.

       

      This issue was never discovered before because the mount path configuration is always something like "/apps, /libs, /jcr:system/rep:permissionStore/oak:mount-libs-default", where "/apps", being first in alphabetic order, is always used in the check. But after OAK-9553, it will be possible to configure multiple mounts and this issue will be much more likely to happen.

      Attachments

        Issue Links

          Activity

            People

              miroslav Miroslav Smiljanic
              jelmini Carlo Jelmini
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: