jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: [MongoMK] flag document with children
Date Thu, 24 Oct 2013 07:57:55 GMT

That sounds good to me.

The disadvantage is, when a node is added, either:

- then the parent needs to be checked whether is already has this flag set
(if it is in the cache), or
- the parent needs to be updated to set the flag

I wouldn't worry too much about resetting the flag, except when deleting
the node with the flag itself.


On 10/24/13 9:35 AM, "Marcel Reutegger" <mreutegg@adobe.com> wrote:

>yesterday Chetan, Thomas and I discussed an access pattern Chetan
>saw with the MongoMK. Installing a vlt package shows many reads on
>MongoDB for children of nodes that do not have child nodes. these
>nodes are the leafs of the tree. due to the current content model,
>the MongoMK does not know if a node has children, by just looking
>at the NodeDocument for that node. we then quickly discussed that
>we could mark the leaf nodes once we discover that it is a leaf.
>I was thinking about this a bit more and came to the conclusion that
>it is probably better to mark the nodes with children, instead of the
>leaf nodes. there are a number of advantages:
>- it works better with concurrent writes. once set, it usually does not
>change back unless the MongoMK GC actually removes a document
>in MongoDB.
>- less storage overhead. there are usually fewer parents than leaf nodes.
>- it does not have to be 100% accurate. false positives are OK (document
>says it has children, but then returns none).
> Marcel

View raw message