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

Chetan Mehrotra commented on OAK-4898:
--------------------------------------

bq. the isExternal methods now still check for info == null even though we aim 
to no longer pass null for an external event,

Per current approach the CommitInfo can have following states
# CommitInfo != null and external == false - Used for local changes
# CommitInfo != null and external == true - Used for external changes where 
NodeStore is able to create one
# CommitInfo == null - Used for other changes like
#* At time of Observer registration when Observable passes in the first 
NodeState then there is no commit info
#* SegmentNodeStore currently passes null for some calls to refreshHead

So changes proposed here were meant to work in those constraints and evolve the 
code. Making CommitInfo non null would require change in NodeStore 
implementations also. That would also make code simpler. What do others think?

bq. but in BackgroundObserver we know that when we collapse we explicitly make 
info == null - and yet the method says isExternal

Okie. But would we want to merge the ChangeSet also when collapsing such 
changes otherwise that information gets lost


> Allow for external changes to have a CommitInfo attached
> --------------------------------------------------------
>
>                 Key: OAK-4898
>                 URL: https://issues.apache.org/jira/browse/OAK-4898
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>             Fix For: 1.6
>
>         Attachments: OAK-4898-v1.patch
>
>
> Currently the observation logic relies on fact that CommitInfo being null 
> means that changes are from other cluster node i.e. external changes. 
> We should change this semantic and provide a different way to indicate that 
> changes are external. This would allow a NodeStore implementation to still 
> pass in a CommitInfo which captures useful information about commit like 
> brief summary on what got changed which can be used for pre filtering 
> (OAK-4796)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to