jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikas Saurabh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-7710) CompositeNodeStore does not dispatch external events to observers
Date Wed, 12 Sep 2018 19:24:00 GMT

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

Vikas Saurabh commented on OAK-7710:

[~tomek.rekawek], afaiu, now locally observed events would be dispatched essentially from
inside {{globalStore#merge}}. There's a good chunk of code (which, admittedly, I don't quite
grasp) beyond {{globalStore#merge}} in {{merge}} method \[0] - the dispatched, afaiu, refers
to new {{'global'NodeState}} but still old states from other stores (which would be ok afaict
- those being read-only)... but there's that hookEnhancer thing (which I've no idea about).

Can you please confirm that we're still ok?

            if (!hookEnhancer.getUpdatedBuilder().isPresent()) {
                // it means that the commit hook wasn't invoked, because there were
                // no changes on the global store. we should invoke it anyway.
                hookEnhancer.processCommit(globalResult, globalResult, info);
            CompositeNodeBuilder updatedBuilder = hookEnhancer.getUpdatedBuilder().get();

            // merge the partial builders
            for (MountedNodeStore mns : ctx.getNonDefaultStores()) {
                NodeBuilder partialBuilder = updatedBuilder.getNodeBuilder(mns);

                if (mns.getMount().isReadOnly()) {
                    assertNoChange(mns, partialBuilder);
                    resultStates.put(mns, mns.getNodeStore().getRoot());
                } else {
                    NodeState partialState = mns.getNodeStore().merge(partialBuilder, EmptyHook.INSTANCE,
                    resultStates.put(mns, partialState);

            CompositeNodeState newRoot = ctx.createRootNodeState(resultStates);

> CompositeNodeStore does not dispatch external events to observers
> -----------------------------------------------------------------
>                 Key: OAK-7710
>                 URL: https://issues.apache.org/jira/browse/OAK-7710
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: composite
>            Reporter: Vikas Saurabh
>            Assignee: Tomek Rękawek
>            Priority: Major
>             Fix For: 1.10, 1.9.9
>         Attachments: OAK-7710-2.patch, OAK-7710-3.patch, OAK-7710.patch, OAK-7710.test.patch
> Currently {{CompositeNodeStore}} only ever dispatches changes from inside its {{merge}}
method. This then loses external events that could be read in background read of some underlying
> [^OAK-7710.test.patch] has an ignored test representing the scenario.

This message was sent by Atlassian JIRA

View raw message