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 2014/09/18 09:19:33 UTC

[jira] [Commented] (OAK-1322) Reduce calls to MongoDB

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

Marcel Reutegger commented on OAK-1322:
---------------------------------------

A recent debug session showed that various reads happen on MongoDB when
a new node is added in Oak. With the current implementation one read
was expected, because Oak first checks if the node exists before it
creates it. However the MongoDB trace log showed the query is executed
twice, which looked strange because the second call should be served 
from the MongoDocumentStore cache.

The MongoDB log also showed reads in the subtree where the node type
definitions are stored. Oak will look up named definitions, which resulted
in additional queries.

Another interesting idea from Norberto Leite was to replace the polling
of the root document with a tailing cursor on the oplog. Since we only
need it to detect changes from other Oak cluster nodes, we could even
tail the oplog on a secondary.


> Reduce calls to MongoDB
> -----------------------
>
>                 Key: OAK-1322
>                 URL: https://issues.apache.org/jira/browse/OAK-1322
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, mongomk
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>             Fix For: 1.1
>
>         Attachments: OAK-1322-mreutegg.patch
>
>
> As discussed with Chetan offline we'd like to reduce the number of calls to MongoDB when content is added to the repository with a filevault package import.



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