Re: [MongoMK] flag document with children

2013-10-25 Thread Chetan Mehrotra
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!! regards Chetan [1] https://issues.apache.org/jira/browse/OAK-1117 Chetan

[MongoMK] flag document with children

2013-10-24 Thread Marcel Reutegger
Hi, 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

Re: [MongoMK] flag document with children

2013-10-24 Thread Thomas Mueller
Hi, 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

RE: [MongoMK] flag document with children

2013-10-24 Thread Marcel Reutegger
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 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

Re: [MongoMK] flag document with children

2013-10-24 Thread Thomas Mueller
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 mreut...@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 set (if

Re: [MongoMK] flag document with children

2013-10-24 Thread Chetan Mehrotra
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