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

Eric Norman commented on SLING-9826:
------------------------------------

[~hanspeterstoerr] I tried out the scenario you described and it fails as you 
described.  I tried the same scenario after applying the fix I was preparing 
for SLING-9825 at: 
[https://github.com/enapps-enorman/sling-org-apache-sling-jcr-oak-server/tree/issue/SLING-9825]
 and the problem seemed to go away.  So I suspect it has the same root cause 
and has something to do with duplicated property index editor or some other 
related side effect.

If you wish, you could get and build the code from my branch to confirm.

 

> jcr:uuid index not updated on move
> ----------------------------------
>
>                 Key: SLING-9826
>                 URL: https://issues.apache.org/jira/browse/SLING-9826
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR, Starter
>    Affects Versions: Starter 12
>         Environment: Sling-Starter 12-SNAPSHOT (commit addb8f7b) with JDK 11 
> and 13 on MacOS, JDK 11 on an x86_64 Linux
>            Reporter: Hans-Peter Stoerr
>            Priority: Major
>
> When changing from Sling Starter 11 to the (almost) latest version of Sling 
> Starter 12-SNAPSHOT I get the problem that it is not possible to find nodes 
> that are mix:referenceable by their jcr:uuid after they have been moved in 
> the JCR tree: Session.getNodeByIdentifier throws an ItemNotFoundException, 
> and a query /jcr:root//*[@jcr:uuid='${uuid}'] does not find the node.
> I tested it with the following code (Node and Session being from javax.jcr.*):
> {code:java}
>     Node parent = session.getNode(PATH);
>     String name = "child" + System.currentTimeMillis();
>     Node child = parent.addNode(name, "sling:Folder");
>     child.addMixin("mix:referenceable");
>     session.save();
>     String id = child.getIdentifier();
>     // session.getNodeByIdentifier(id); // OK, works as expected here.
>     session.move(child.getPath(), PATH2 + "/" + name);
>     session.save();
>     session.getNodeByIdentifier(id); // often throws ItemNotFoundException!
> {code}
> PATH and PATH2 denote two preexisting writeable nodes. If I force a refresh 
> of the /oak:index/uuid, the node is found again - until it is moved again. 
> The query problem is also easy to replicate by creating a mix:referenceable 
> node in the browser, moving it and trying to query it with 
> /jcr:root//*[@jcr:uuid='${uuid}'] .
> I initially reported the bug to the Jackrabbit OAK project, but it is not 
> possible to reproduce this with the oak-jcr tests. I could also not reproduce 
> it with a unit test in org-apache-sling-jcr-resource, only when using the 
> Sling Starter 12. [This comment on my Oak 
> bugreport|https://issues.apache.org/jira/browse/OAK-9253?focusedCommentId=17213939&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17213939]
>  suggests that there might be some misconfiguration in Sling.
> Thank you very much!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to