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

Marcel Reutegger commented on OAK-4898:
---------------------------------------

The contract for {{Observer}} must be updated. The class JavaDoc still states 
that {{CommitInfo}} is optional and defines the semantics of a non-null 
{{CommitInfo}}, which would not be accurate anymore.

Many {{Observer}} implementations still have {{CommitInfo}} parameter annotated 
with {{@Nullable}}.

I would add a {{checkNotNull(info)}} in {{BackgroundObserver.contentChanged()}}.

What is the TODO about in BackgroundObserver? Looks like it can be removed.

The anonymous {{FilterProvider}} in {{FilterBuilder.build()}} has a 
{{@CheckForNull CommitInfo}}. Is the commit info coming directly from an 
callback to an {{Observer}} or is it coming from a {{ContentChange#info}}? The 
latter can still be {{null}} and would now result in a NPE in {{isExternal()}}. 
The null check in this class is also inconsistent. {{isLocal()}} still performs 
a check.

{{DocumentNodeStore.canceled()}} catches an {{IllegalMonitorStateException}}. 
Probably an leftover from OAK-4687.

The log message in {{DocumentDiscoveryLiteService.contentChanged()}} should be 
updated. It currently refers to 'commit info being null'.

Pre-filtering related classes like {{FilteringAwareObserver}}, 
{{FilteringDispatcher}} and {{ChangeProcessor}} have inconsistent contracts for 
{{CommitInfo}}.

I'm also a bit concerned that required changes to {{BackgroundObserver}} have 
been moved to a separate issue OAK-5121. I think it would be better to address 
the OAK-5121 in the context of this issue because it also helps clarify changes 
in {{FilterBuilder}}.

> 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, OAK-4898-v2.patch, OAK-4898-v3.patch, 
> OAK-4898-v4.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