[
https://issues.apache.org/jira/browse/OAK-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475419#comment-17475419
]
Marcel Reutegger commented on OAK-9660:
---------------------------------------
[~bstopp] thanks for reporting the issue.
I took your test servlet and turned it into a oak-jcr test. This makes it
easier for the Oak team to further debug the issue.
The test is in this PR: https://github.com/apache/jackrabbit-oak/pull/461
> NullPointerException When Moving Transient node
> -----------------------------------------------
>
> Key: OAK-9660
> URL: https://issues.apache.org/jira/browse/OAK-9660
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 1.8.8, 1.40.0
> Reporter: Bryan Stopp
> Priority: Major
>
> When a node is moved in a uncommitted Session1 (S), that was previously moved
> in a closed/committed Session0 (S'), any transient children nodes that are
> moved throw NPEs in the node memory manager tracking the uncommitted state.
>
> Steps to reproduce:
> # Start Sling docker container
> ## ` docker run -p 8080:8080 apache/sling`
> # Install [demo project|https://github.com/bstopp/oak-move-bug]
> # Disable administrative login security, or create a rule for the servlet.
> # Navigate to the [Demo servlet|http://localhost:8080/bin/bug/test]
>
> The servlet will catch the NPE and display it. The error occurs
> [here|https://github.com/apache/jackrabbit-oak/blob/74a1a686635be76b74abd57ebc0ef1dd4bb44889/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java#L449].
> `base` is not null, but `head` is.
> It seems that the `base` look up finds the segment metadata from Session0
> (S') that has been dispatched (before the current session was created), and
> not recognizing that the parent is now a transient node in Session1 (S).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)