[jira] [Comment Edited] (OAK-1117) [MongoMk]Flag document with children

2013-10-28 Thread Chetan Mehrotra (JIRA)

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

Chetan Mehrotra edited comment on OAK-1117 at 10/28/13 9:52 AM:


Patch to optimize based on above mentioned approach. Points to note

* A new flag {{_children}} added. Which if
** false - By default flag is not set. So if not present the value is assumed 
to be false
** true - Indicates that there might be child nodes for this path. It might 
happen that there are no child node found if actual call is performed
* Flag once set would not be unset
* With this logic it might happen that commit root changes as we might have to 
change the flag for a path which is not part of the commit. Due to this has to 
change assertions in 2 testcases
* With this change in place there would be some latency when a new node is 
added to a parent which did not had a child node so far. That change would only 
be picked up once backGround operations are complete on other nodes. 

With this set the number of calls reduce considerably. For example on restart 
of Adobe CQ it goes from 42000 to 25000


was (Author: chetanm):
Patch to optimize based on above mentioned approach. Points to note

* A new flag {{_hasChildNodes}} added. Which if
** false - Indicates that there are no child for this path
** true - Indicates that there might be child nodes for this path. It might 
happen that there are no child node found if actual call is performed
* Flag once set would not be unset
* With this logic it might happen that commit root changes as we might have to 
change the flag for a path which is not part of the commit. Due to this has to 
change assertions in 2 testcases
* With this change in place there would be some latency when a new node is 
added to a parent which did not had a child node so far. That change would only 
be picked up once backGround operations are complete on other nodes. 

With this set the number of calls reduce considerably. For example on restart 
of Adobe CQ it goes from 42000 to 25000

> [MongoMk]Flag document with children
> 
>
> Key: OAK-1117
> URL: https://issues.apache.org/jira/browse/OAK-1117
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: mongomk
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Attachments: OAK-1117.patch
>
>
> 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.
> To help such cases it would be better if we mark nodes which have children. 
> Refer to [1] for more details
> [1] http://markmail.org/thread/7olmv5iqapmheasz



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


[jira] [Comment Edited] (OAK-1117) [MongoMk]Flag document with children

2013-10-25 Thread Chetan Mehrotra (JIRA)

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

Chetan Mehrotra edited comment on OAK-1117 at 10/25/13 11:04 AM:
-

Patch to optimize based on above mentioned approach. Points to note

* A new flag {{_hasChildNodes}} added. Which if
** false - Indicates that there are no child for this path
** true - Indicates that there might be child nodes for this path. It might 
happen that there are no child node found if actual call is performed
* Flag once set would not be unset
* With this logic it might happen that commit root changes as we might have to 
change the flag for a path which is not part of the commit. Due to this has to 
change assertions in 2 testcases
* With this change in place there would be some latency when a new node is 
added to a parent which did not had a child node so far. That change would only 
be picked up once backGround operations are complete on other nodes. 

With this set the number of calls reduce considerably. For example on restart 
of Adobe CQ it goes from 42000 to 25000


was (Author: chetanm):
Patch to optimize based on above mentioned approach. Points to note

* A new flag {{_hasChildNodes}} added. Which if
** false - Indicates that there are no child for this path
** true - Indicates that there might be child nodes for this path. It might 
happen that there are no child node found if actual call is performed
* Flag once set would not be unset
* With this logic it might happen that commit root changes as we might have to 
change the flag for a path which is not part of the commit. Due to this has to 
change assertions in 2 testcases

With this set the number of calls reduce considerably. For example on restart 
of Adobe CQ it goes from 42000 to 25000

> [MongoMk]Flag document with children
> 
>
> Key: OAK-1117
> URL: https://issues.apache.org/jira/browse/OAK-1117
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: mongomk
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Attachments: OAK-1117.patch
>
>
> 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.
> To help such cases it would be better if we mark nodes which have children. 
> Refer to [1] for more details
> [1] http://markmail.org/thread/7olmv5iqapmheasz



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