jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: [MongoMK] flag document with children
Date Fri, 25 Oct 2013 10:59:56 GMT
I have implemented the above logic as part of OAK-1117 [1]. With this
in place number of call made to Mongo on restarts of Adobe CQ goes
down from 42000 to 25000 significantly reducing the startup time when
Mongo is remote!!

[1] https://issues.apache.org/jira/browse/OAK-1117
Chetan Mehrotra

On Thu, Oct 24, 2013 at 3:23 PM, Chetan Mehrotra
<chetan.mehrotra@gmail.com> wrote:
> I am trying to prototype an approach. Would come up with a patch for
> this soon. So far I was going with the reverse approach whereby when I
> fetch a node I retrieve some extra child rows [1] in same call to
> determine if it has any children.
> But given that number of read would far exceed number of writes it
> would be better to perform extra update call. I would try to come up
> with a patch for this
> regards
> Chetan
> [1] by adding an or clause to fetch node with id say "^2:/foo/.*" to
> fetch child node for a parent with id "1:/foo".
> Chetan Mehrotra
> On Thu, Oct 24, 2013 at 3:08 PM, Thomas Mueller <mueller@adobe.com> wrote:
>> Hi,
>> Yes, you are right. It should be relatively easy to implement (low risk).
>> Regards,
>> Thomas
>> On 10/24/13 10:12 AM, "Marcel Reutegger" <mreutegg@adobe.com> wrote:
>>>> The disadvantage is, when a node is added, either:
>>>> - then the parent needs to be checked whether is already has this flag
>>>> (if it is in the cache), or
>>>I'd say a parent node is likely in the cache because oak will read it
>>>first before
>>>it is able to add a child.
>>>> - the parent needs to be updated to set the flag
>>>that's correct. though you only have to do it when it isn't set already.
>>>the check should be cheap in most cases, because the node is in the cache.
>>> marcel

View raw message