You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Michael Dürig <md...@apache.org> on 2014/01/08 15:29:22 UTC

Re: svn commit: r1556371 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core: AbstractRoot.java MutableTree.java


On 7.1.14 10:51 , jukka@apache.org wrote:
>       public void rebase() {
>           checkLive();
> -        if (!store.getRoot().equals(getBaseState())) {
> +        if (!store.getRoot().equals(getBaseState())) { // TODO: do we need this?
>               store.rebase(builder);
>               secureBuilder.baseChanged();
>               if (permissionProvider.hasValue()) {

Not any more I think. This might be a leftover from the time rebasing 
was handled on the Tree/Root layer. Today it would be better to leave 
this kind of optimisation to the layers actually performing the rebase.

However, removing this check seems to uncover a problem with the 
SegmentMK: it makes 
org.apache.jackrabbit.oak.core.MutableTreeTest#modifiedAfterRebase fail 
for that fixture. For some reason the status of a modified node changes 
to existing after a rebase, which is wrong.

Jukka, would you be able to look into this?

Michael

Re: svn commit: r1556371 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core: AbstractRoot.java MutableTree.java

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Jan 8, 2014 at 9:49 AM, Jukka Zitting <ju...@gmail.com> wrote:
> On Wed, Jan 8, 2014 at 9:29 AM, Michael Dürig <md...@apache.org> wrote:
>> However, removing this check seems to uncover a problem with the SegmentMK:
>> it makes org.apache.jackrabbit.oak.core.MutableTreeTest#modifiedAfterRebase
>> fail for that fixture. For some reason the status of a modified node changes
>> to existing after a rebase, which is wrong.
>>
>> Jukka, would you be able to look into this?
>
> Sure.

The problem turned out to be in the MutableNodeState.isModified()
check, triggered by the way the SegmentMK automatically purges
uncommitted changes. Fixed in revision 1558270.

BR,

Jukka Zitting

Re: svn commit: r1556371 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core: AbstractRoot.java MutableTree.java

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Jan 8, 2014 at 9:29 AM, Michael Dürig <md...@apache.org> wrote:
> Not any more I think. This might be a leftover from the time rebasing was
> handled on the Tree/Root layer. Today it would be better to leave this kind
> of optimisation to the layers actually performing the rebase.

Agreed.

> However, removing this check seems to uncover a problem with the SegmentMK:
> it makes org.apache.jackrabbit.oak.core.MutableTreeTest#modifiedAfterRebase
> fail for that fixture. For some reason the status of a modified node changes
> to existing after a rebase, which is wrong.
>
> Jukka, would you be able to look into this?

Sure.

BR,

Jukka Zitting