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 "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2013/09/11 13:36:52 UTC

[jira] [Comment Edited] (OAK-992) NPE when running FlatTreeWithAceForSamePrincipalTest on MongoMK

    [ https://issues.apache.org/jira/browse/OAK-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13764222#comment-13764222 ] 

Marcel Reutegger edited comment on OAK-992 at 9/11/13 11:35 AM:
----------------------------------------------------------------

The state of branch commit revisions are indeed changed on merge. This was introduced with OAK-893. This issue also describes in more detail how it works. The problem now is that the branch commits become invalid from a branch point of view after the merge.

I added a simple test case in http://svn.apache.org/r1521805
                
      was (Author: mreutegg):
    The state of branch commit revisions are indeed changed on merge. This was introduced with OAK-893. This issue also describes in more detail how it works. The problem now is that the branch commits become invalid after the merge from a branch point of view.

I added a simple test case in http://svn.apache.org/r1521805
                  
> NPE when running FlatTreeWithAceForSamePrincipalTest on MongoMK
> ---------------------------------------------------------------
>
>                 Key: OAK-992
>                 URL: https://issues.apache.org/jira/browse/OAK-992
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, mongomk
>    Affects Versions: 0.8
>            Reporter: Michael Dürig
>            Assignee: Marcel Reutegger
>
> Running 
> {code}
> benchmark FlatTreeWithAceForSamePrincipalTest Oak-Mongo
> {code}
> results in a NPE [1] after a couple of minutes.
> My initial analysis showed that {{MicroKernel.getNodes()}} returns {{null}} in {{KernelNodeState.init()}}. The requested revision was {{br140e35028e6-0-1}}, AFAICS a branch revision that doesn't exist any more.
> Looking at the base state in {{KernelNodeStoreBranch.InMemory.merge()}} a couple of stack frames below I found the following:
> {code}
> base = /@r140e350df05-0-1 children: 5 id: /@r140e350df05-0-1 ...
> base.getChildNode("a") = /a@r140e350df05-0-1 children: 9223372036854775807 id: /a@r140e350df05-0-1 ...
> base.getChildNode("a").getChildNode("node9285") = /a/node9285@br140e35028e6-0-1 children: 1 id: /a/node9285@r140e34fdff7-0-1 ...
> {code}
> Obviously obtaining child {{node9285}} from {{/a}} switches from a trunk revision to a branch revision. This look suspicious.
> [1]
> {code}
> java.lang.NullPointerException
> 	at org.apache.jackrabbit.mk.json.JsopTokenizer.<init>(JsopTokenizer.java:41)
> 	at org.apache.jackrabbit.mk.json.JsopTokenizer.<init>(JsopTokenizer.java:47)
> 	at org.apache.jackrabbit.oak.kernel.KernelNodeState.init(KernelNodeState.java:160)
> 	at org.apache.jackrabbit.oak.kernel.KernelNodeState.getProperty(KernelNodeState.java:251)
> 	at org.apache.jackrabbit.oak.spi.state.AbstractNodeState.getName(AbstractNodeState.java:88)
> 	at org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.isOfMatchingType(PropertyIndexEditor.java:165)
> 	at org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.enter(PropertyIndexEditor.java:189)
> 	at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java:58)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.enter(CompositeEditor.java:66)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:49)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeDeleted(EditorDiff.java:141)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstBaseState(EmptyNodeState.java:139)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeDeleted(EditorDiff.java:141)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstBaseState(EmptyNodeState.java:139)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeDeleted(EditorDiff.java:141)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:380)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:50)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:59)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:59)
> 	at org.apache.jackrabbit.oak.kernel.KernelNodeStoreBranch$InMemory.merge(KernelNodeStoreBranch.java:287)
> 	at org.apache.jackrabbit.oak.kernel.KernelNodeStoreBranch.merge(KernelNodeStoreBranch.java:136)
> 	at org.apache.jackrabbit.oak.core.AbstractRoot$2.run(AbstractRoot.java:245)
> 	at org.apache.jackrabbit.oak.core.AbstractRoot$2.run(AbstractRoot.java:241)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.Subject.doAs(Subject.java:337)
> 	at org.apache.jackrabbit.oak.core.AbstractRoot.commit(AbstractRoot.java:240)
> 	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:281)
> 	at org.apache.jackrabbit.oak.jcr.SessionImpl$8.perform(SessionImpl.java:394)
> 	at org.apache.jackrabbit.oak.jcr.SessionImpl$8.perform(SessionImpl.java:391)
> 	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:117)
> 	at org.apache.jackrabbit.oak.jcr.SessionImpl.perform(SessionImpl.java:117)
> 	at org.apache.jackrabbit.oak.jcr.SessionImpl.save(SessionImpl.java:391)
> 	at org.apache.jackrabbit.oak.benchmark.FlatTreeWithAceForSamePrincipalTest.afterSuite(FlatTreeWithAceForSamePrincipalTest.java:89)
> 	at org.apache.jackrabbit.oak.benchmark.AbstractTest.tearDown(AbstractTest.java:165)
> 	at org.apache.jackrabbit.oak.benchmark.FlatTreeWithAceForSamePrincipalTest.tearDown(FlatTreeWithAceForSamePrincipalTest.java:31)
> 	at org.apache.jackrabbit.oak.benchmark.AbstractTest.runTest(AbstractTest.java:130)
> 	at org.apache.jackrabbit.oak.benchmark.AbstractTest.run(AbstractTest.java:91)
> 	at org.apache.jackrabbit.oak.benchmark.FlatTreeWithAceForSamePrincipalTest.run(FlatTreeWithAceForSamePrincipalTest.java:31)
> 	at org.apache.jackrabbit.oak.benchmark.BenchmarkRunner.main(BenchmarkRunner.java:126)
> 	at org.apache.jackrabbit.oak.run.Main.main(Main.java:61)
> {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