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 "Angela Schreiber (Jira)" <ji...@apache.org> on 2020/10/16 11:10:00 UTC
[jira] [Resolved] (OAK-9253) getNodeByIdentifier doesn't find moved
node
[ https://issues.apache.org/jira/browse/OAK-9253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Angela Schreiber resolved OAK-9253.
-----------------------------------
Resolution: Duplicate
resolving this as duplicate of SLING-9826
> getNodeByIdentifier doesn't find moved node
> -------------------------------------------
>
> Key: OAK-9253
> URL: https://issues.apache.org/jira/browse/OAK-9253
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: jcr
> Affects Versions: 1.32.0
> Environment: OAK 1.32.0 , Jackrabbit 2.20.0 with tarfile persistence with in Apache Sling, JDK 13.0.2 on MacOS
> Reporter: Hans-Peter Stoerr
> Priority: Major
>
> When I move a mix:referenceable node, it sometimes happens that the moved node is not found with session.getNodeByIdentifier anymore - it throws an ItemNotFoundException, and a query /jcr:root//*[@jcr:uuid='${uuid}'] also does not find the node. This is not completely deterministic - sometimes works correctly, but in my environment it fails more often than not.
> 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.
> I discovered the problem using the (almost) latest version of [Sling Starter|https://github.com/apache/sling-org-apache-sling-starter/commit/addb8f7ba16dfb2ab6cda1a70f98a461a7cacb7a] which uses OAK version 1.32.0 and Jackrabbit version 2.20.0 with tarfile persistence. (I'm not sure whether this is an OAK or Jackrabbit bug - please forgive me if it's the wrong project). With the previously released version 11 of Sling Starter, using OAK version 1.8.8 and Jackrabbit version 2.16.3 there were no such problems.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)