jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-421) NodeBuilder.reset might lead to inconsistent builder
Date Mon, 05 Nov 2012 10:36:11 GMT

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

Jukka Zitting commented on OAK-421:
-----------------------------------

The +2 sounds a bit suspicious.

I looked at this and it looks like the problem was rather in the write() method that would
stop recursion up to the root when the first up-to-date builder was encountered. This is incorrect
since in a write() all builders up to the root need to be updated to have the latest revision
number.

A fix is in https://github.com/jukka/jackrabbit-oak/commit/e01558418008e41a94c44ea00494f6a939ed58a2.
I'll commit it once I have svn working on the temporary laptop I have with me now.
                
> NodeBuilder.reset might lead to inconsistent builder
> ----------------------------------------------------
>
>                 Key: OAK-421
>                 URL: https://issues.apache.org/jira/browse/OAK-421
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Michael Dürig
>
> The following test fails:
> {code}
> NodeBuilder root = new MemoryNodeBuilder(BASE);
> NodeBuilder x = root.child("x");
> NodeBuilder y = x.child("y");
> root.reset(BASE);
> assertTrue(root.hasChildNode("x"));
> assertFalse(x.hasChildNode("y"));  // fails
> {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

Mime
View raw message