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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/02/23 15:07:44 UTC

[jira] [Commented] (OAK-5511) Reduce lookup for oak:index node under each changed node

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

Thomas Mueller commented on OAK-5511:
-------------------------------------

Such a property can get out of sync (which is specially problematic if the property is not there if it should be). The logic to create / remove that property should also deal with moving nodes around.

> This smells of optimisation for the mongo storage

Yes, but how to avoid it? Maybe with a negative cache? That can get out-of-sync as well, so it might mean very complicated code there in order to "hide" this from the rest of Oak. So if slightly more complex oak-core code (that is, using :oak-index-present) simplifies the document store a lot, then we should probably do that.

> Reduce lookup for oak:index node under each changed node
> --------------------------------------------------------
>
>                 Key: OAK-5511
>                 URL: https://issues.apache.org/jira/browse/OAK-5511
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Chetan Mehrotra
>              Labels: performance
>             Fix For: 1.8
>
>
> Currently {{IndexUpdate}} does a lookup for {{oak:index}} node under each changed node. This is done to pickup index definitions and create IndexEditor based on those so as to index content under that subtree. 
> This lookup results in extra remote calls on DocumentNodeStore based setup as for non leaf nodes NodeStore has to check from remote storage to determine if {{oak:index}} node is present or not.
> This lookup can be avoided by
> # Having an {{Editor}} which adds a hidden property {{:oak-index-present}} in parent node upon addition of {{oak:index}} as a child node
> # IndexUpdate would then does a lookup for {{oak:index}} node only if such a hidden property is found
> For upgrade we would have some logic which would make use of Nodetype index to identify all such nodes and mark them
> Discussion [thread|https://lists.apache.org/thread.html/70d5ffff0f950d7fc25bc1bbb41527f5672825f8cf2b238f54df2966@%3Coak-dev.jackrabbit.apache.org%3E] on oak-dev



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)