jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (JCR-3695) Jcr2spi same name siblings not functional
Date Mon, 09 Dec 2013 11:45:08 GMT

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

Michael Dürig commented on JCR-3695:
------------------------------------

>From the issue description I cannot infer what is wrong with SNSs. I ran a quick check
with the {{jackrabbit-spi2jcr}} module and there SNSs are properly reported when calling {{Node.getNodes()}}.
Please clarify, optimally by adding a patch with a test case that demonstrated the problem.


The NodeIds passed to {{RepositoryService.getItemInfos()}} will not contain a path part when
the item in question has an unique id. See the contract of {{ItemId}}: "@return the path part
of this item id. Returns null if this item can be identified solely with a uniqueID." To this
respect your patch breaks that contract. 


> Jcr2spi same name siblings not functional
> -----------------------------------------
>
>                 Key: JCR-3695
>                 URL: https://issues.apache.org/jira/browse/JCR-3695
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr2spi
>    Affects Versions: 2.1
>            Reporter: Abhinav Atul
>         Attachments: patch.diff
>
>
> Summary: Path not provided along with unique id in NodeId when calling org.apache.jackrabbit.spi.RepositoryService.getItemInfos(SessionInfo,
NodeId). Path needed to maintain SNS index
>  the path index set up when populating the parent folder with child node info(unique
id + path with index for same name sibling) is needed to maintain the indexing order during
previous iteration.
> For example, a folder node ‘F’ has been populated with two child entries 
> C(uid:”abcd”,path:/F/C) and C[2](uid:”mnop”,path:/F/C[2])
> When retrieving child nodes of F, NodeId only contains uid(“mnop”) and no path which
is needed to setup path for the entry
> Here is some runtime for clarity,
>  Stack for parent node – creating node state
> org.apache.jackrabbit.spi.RepositoryService.getItemInfos(SessionInfo, NodeId)
> org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.createNodeState(NodeId
nodeId, NodeEntry entry)
> this creates a NodeInfo of the parent with a list of childinfo containing uid + path
of children, note that path contains
> sns index of the child.
> Now when trying to createNodeState for children of above parent node, stack is same
> org.apache.jackrabbit.spi.RepositoryService.getItemInfos(SessionInfo, NodeId)
> org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.createNodeState(NodeId
nodeId, NodeEntry entry)
> *But the NodeId which should also contain path information when parent node state was
constructed is missing*. This path is needed to maintain SNS indexing calculated while populating
parent node.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message