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

Tomek Rękawek commented on OAK-7710:
------------------------------------

[~mreutegg], [~catholicon] - WRT to Marcel's latest comment:

> I think there's a general problem with how the CompositeNodeStore.merge() 
> method interacts with the stores and the observers. The assumption is that 
> the mergeLock protects a critical section, which is not the case when the 
> DocumentNodeStore is used as the globalStore and external changes come in. 
> Maybe the observer callbacks could be coordinated with the help of the 
> CommitInfo? IIRC that's the same object passed to the merge() call.

Can we use the CommitInfo#isExternal() to differentiate between these two 
cases? Eg. we can:

1. for the local changes, we can explicitly invoke the 
{{dispatcher.contentChanged()}} in the {{CompositeNodeStore#merge()}} method,
2. for the external changes, we can only process events with 
{{CommitInfo#isExternal() == true}} in the {{MountedNodeStoreObserver}}.

> 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.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)

Reply via email to