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 "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2013/11/13 12:30:19 UTC

[jira] [Resolved] (OAK-534) Inefficient NodeState comparison with MongoMK

     [ https://issues.apache.org/jira/browse/OAK-534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger resolved OAK-534.
----------------------------------

    Resolution: Won't Fix

This issue was filed for the initial version of the MongoMK. Resolving as WONTFIX.

> Inefficient NodeState comparison with MongoMK
> ---------------------------------------------
>
>                 Key: OAK-534
>                 URL: https://issues.apache.org/jira/browse/OAK-534
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, mongomk
>    Affects Versions: 0.5
>            Reporter: Marcel Reutegger
>         Attachments: OAK-534.patch
>
>
> Oak on MongoMK currently results in complete tree traversal for any kind of modification. This is caused by the fact that MongoMK does not support the optional :hash system property. In this case KernelNodeState.compareAgainstBaseState() falls back to a generic implementation, which traverses the complete tree to find out if a subtree was modified.
> The NodeState comparison is triggered in almost all commit hook and validator implementations to find out what changed with the given commit.
> I see a number of options to solve this:
> 1) Add support for :hash system property in MongoMK
> 2) Use MK.diff() to find out if something was modified in a subtree
> 3) Use MK.getJournal() to find out if something was modified in a subtree
> Some initial thoughts on presented options to start the discussion (feel free to jump in and add more):
> Adding the :hash system property in MongoMK might not be that easy, because the implementation tries to avoid contention on the root node by not updating it with every commit. It only updates the nodes that actually changed. A straight forward implementation of :hash requires updating all ancestors of modified nodes.
> Option 2) seems to require additional work in MongoMK because the diff() implementation in MongoMK is using oak-mk DiffBuilder. The builder in turn will then call SimpleMongoNodeStore.compare(), which seems to use the same generic comparison implementation as the fallback in KernelNodeState.compareAgainstBaseState().
> AFAICS 3) might be a viable option with the recent support for branches in getJournal() (OAK-501). But I don't know how efficient this is implemented in MongoMK.



--
This message was sent by Atlassian JIRA
(v6.1#6144)