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

Abhinav Atul edited comment on JCR-3695 at 12/9/13 12:36 PM:
-------------------------------------------------------------

Hi [~mduerig], the issue is once parent P is populated with same name children 
in its childinfo [ name: A, uid - uidA], [name: A[2], uid - uidA2], the next 
time when jcr2spi sends its implementation only uidA2 for retrieval, it does 
not know whether to initialize its path with /P/A[2] or /P/A which is later 
rejected if initialized path is /P/A(as uidA2 was named as A[2] during 
generating info for parent P) with the following error message: 

HierarchyEntry /P/A[2] does not match ItemInfo /P/A

The relevant method is 
org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.assertMatchingPath(ItemInfo,
 HierarchyEntry)



was (Author: abhinavatul):
Hi [~mduerig], the issue is once parent P is populated with same name children 
[ name: A, uid - uidA], [name: A[2], uid - uidA2], the next time when jcr2spi 
sends its implementation only uidA2 for retrieval, it does not know whether to 
initialize its path with /P/A[2] or /P/A which is later rejected if initialized 
path is /P/A(as uidA2 was named as A[2] during generating info for parent P) 
with the following error message: 

HierarchyEntry /P/A[2] does not match ItemInfo /P/A

The relevant method is 
org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.assertMatchingPath(ItemInfo,
 HierarchyEntry)


> 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)

Reply via email to