[ 
https://issues.apache.org/jira/browse/OAK-778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jukka Zitting resolved OAK-778.
-------------------------------

    Resolution: Fixed

As of revisions 1469250 and 1469264 the MemoryNodeBuilder class now 
automatically unwraps all ModifiedNodeState instances passed to reset() and 
setNode() methods. This should prevent such stacked cases from coming up 
regardless of how the builder is used.
                
> Recursive wrapping of ModifiedNodeState
> ---------------------------------------
>
>                 Key: OAK-778
>                 URL: https://issues.apache.org/jira/browse/OAK-778
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Marcel Reutegger
>            Assignee: Jukka Zitting
>            Priority: Minor
>
>  There seem to be cases where a SecureNodeState wraps a ModifiedNodeState, 
> which in turn wraps a whole chain of other ModifiedNodeStates. A stack trace 
> from one of the oak-core tests looks like this:
> {code}
> "main" prio=6 tid=0x00000000005ac000 nid=0xa04 runnable [0x00000000020ad000]
>    java.lang.Thread.State: RUNNABLE
>         at 
> org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.exists(EmptyNodeState.java:51)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:202)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:199)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:199)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:199)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:199)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:199)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:199)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:199)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.getChildNodeCount(ModifiedNodeState.java:199)
>         at 
> org.apache.jackrabbit.oak.core.SecureNodeState$3.apply(SecureNodeState.java:102)
>         at 
> org.apache.jackrabbit.oak.core.SecureNodeState$3.apply(SecureNodeState.java:94)
>         at 
> org.apache.jackrabbit.oak.core.SecureNodeState.getChildNode(SecureNodeState.java:209)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.getBaseState(MemoryNodeBuilder.java:162)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.write(MemoryNodeBuilder.java:251)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.write(MemoryNodeBuilder.java:243)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.write(MemoryNodeBuilder.java:243)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.write(MemoryNodeBuilder.java:236)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.setProperty(MemoryNodeBuilder.java:452)
>         at 
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.setProperty(MemoryNodeBuilder.java:466)
>         at 
> org.apache.jackrabbit.oak.core.TreeImpl.setProperty(TreeImpl.java:385)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to