[
https://issues.apache.org/jira/browse/OAK-7710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608981#comment-16608981
]
Marcel Reutegger commented on OAK-7710:
---------------------------------------
bq. Can we use the CommitInfo#isExternal() to differentiate between these two
cases?
Yes, that should work, but I think there's still a problem with the proposal.
While the CompositeNodeStore merge lock synchronizes access to the NodeStore
from the upper layer, it doesn't protect the critical merge section from the
concurrent background read of external changes. I think that means there's a
race condition that may violate the contract of {{Observer}}. Consider a local
merge C1 that goes through the node store, but does not yet get passed to the
observer. Instead, an external change C2 gets dispatched first to the observer,
which means the observer will see C1 after C2.
> 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
>
> Attachments: OAK-7710-2.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 {{DocumentNodeStore}}.
> [^OAK-7710.test.patch] has an ignored test representing the scenario.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)