You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Carlo Jelmini (Jira)" <ji...@apache.org> on 2022/01/26 14:19:00 UTC

[jira] [Created] (OAK-9676) In CompositeNodeStore, mounts are ignored when iterating through child nodes

Carlo Jelmini created OAK-9676:
----------------------------------

             Summary: In CompositeNodeStore, mounts are ignored when iterating through child nodes
                 Key: OAK-9676
                 URL: https://issues.apache.org/jira/browse/OAK-9676
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: composite
    Affects Versions: 1.42.0
            Reporter: Carlo Jelmini


h3. 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 
{code:java}
nodeStore.getRoot().getChildNodeNames() {code}
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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)