You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Eric Norman (Jira)" <ji...@apache.org> on 2020/10/15 21:34:00 UTC
[jira] [Assigned] (SLING-9826) jcr:uuid index not updated on move
[ https://issues.apache.org/jira/browse/SLING-9826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Norman reassigned SLING-9826:
----------------------------------
Assignee: Eric Norman
> 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
> Assignee: Eric Norman
> Priority: Major
> Fix For: JCR Oak Server 1.2.10
>
>
> 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)