You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2016/11/15 07:46:58 UTC

[jira] [Commented] (OAK-4935) support prefiltering of async index updates

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

Chetan Mehrotra commented on OAK-4935:
--------------------------------------

After doing the changes the number of {{prefilterSkips}} have gone down to 3 from 7 for each async index cycle i.e. for 3 contentChange events received pre filtering cannot be performed. Digging further lead to root cause close to OAK-4924. For example in SegmentNodeStore when a new checkpoint gets created it performs a {{refreshHead}} which leads to Change dispatched with null commitInfo in {{CPCreator}}

{code}
 NodeBuilder props = cp.setChildNode("properties");
            for (Entry<String, String> p : properties.entrySet()) {
                props.setProperty(p.getKey(), p.getValue());
            }
            cp.setChildNode(ROOT, state.getChildNode(ROOT));

            SegmentNodeState newState = builder.getNodeState();
            if (revisions.setHead(state.getRecordId(), newState.getRecordId())) {
                refreshHead();
                return true;
            }
{code}

[~mduerig] [~alex.parvulescu] Any thoughts if this aspect can be optimized wrt pre filtering i.e. only for refreshHead call when checkpoint is being created as its known that no other change has happened in between.

For DocumentNodeStore this is not an issue as no event is dispatched

/cc [~egli] [~mreutegg]


> support prefiltering of async index updates
> -------------------------------------------
>
>                 Key: OAK-4935
>                 URL: https://issues.apache.org/jira/browse/OAK-4935
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.5.12
>            Reporter: Stefan Egli
>            Assignee: Chetan Mehrotra
>             Fix For: 1.6
>
>
> As pointed out [here|https://issues.apache.org/jira/browse/OAK-4924?focusedCommentId=15568308&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15568308] at the moment the AsyncIndexUpdate, via SegmentNodeStore.refreshHead passes null in the contentChanged call. This prevents prefiltering from being applied.
> [~chetanm] suggested to explicitly run the ChangeCollector ValidationProvider in the AsyncIndexUpdate.mergeWithConcurrencyCheck (see [comment here|https://issues.apache.org/jira/browse/OAK-4924?focusedCommentId=15568339&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15568339]).
> Alternatively the AsyncIndexUpdate.mergeWithConcurrencyCheck could provide an explicit ChangeSet representing empty sets for all (paths, names, types, properties), as really an index update shouldn't generate anything of interest for any jcr listener. Not sure if this is always 100% the case but it sounds like a bit of a waste of CPU to collect hidden paths (of the indices) in a ChangeSet which then anyway shouldn't be applicable to any listener. But yes, it would be somewhat of a violation of the general contract to have the ChangeSet represent all changes. Then again, we could argue that hidden paths aren't included.
> [~chetanm], wdyt?



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