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 "Miroslav Smiljanic (Jira)" <ji...@apache.org> on 2022/01/27 14:18:00 UTC

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

    [ https://issues.apache.org/jira/browse/OAK-9676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17483169#comment-17483169 ] 

Miroslav Smiljanic commented on OAK-9676:
-----------------------------------------

[~jelmini]  thank you for reporting the issue and submitting PR. 

> 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
>            Priority: Major
>
> 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)