[
https://issues.apache.org/jira/browse/OAK-11845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017363#comment-18017363
]
Marcel Reutegger commented on OAK-11845:
----------------------------------------
bq. so what is the conclusion here?
NodeBuilder implementations are not thread-safe and client code must ensure
NodeBuilder instances are not accessed concurrently. The same applies to Tree
instances, the next layer on top of NodeBuilders:
https://github.com/apache/jackrabbit-oak/blob/a1bbab21ab773faf74fda344b0d37523d2c84796/oak-api/src/main/java/org/apache/jackrabbit/oak/api/Tree.java#L56-L61
In my view some code accessing NodeBuilder or Tree instances is not
synchronized properly. This usually happens through the various
[SessionDelegate|https://github.com/apache/jackrabbit-oak/blob/0ef8a642dde9f3a7680d331441f08d08114a9bf6/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/SessionDelegate.java#L225]
perform methods.
> Avoid race conditions in SecureNodeBuilder#getTreePermissions()
> ---------------------------------------------------------------
>
> Key: OAK-11845
> URL: https://issues.apache.org/jira/browse/OAK-11845
> Project: Jackrabbit Oak
> Issue Type: Technical task
> Components: core
> Reporter: Manfred Baedke
> Assignee: Manfred Baedke
> Priority: Major
>
> The member variable treePermission in particular may currently been set to
> null by a concurrent thread calling the method #baseChanged() during the
> execution of #getTreePermission().
--
This message was sent by Atlassian Jira
(v8.20.10#820010)