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

Marcel Reutegger commented on OAK-638:
--------------------------------------

bq. initially live only in local memory

This sounds like a reasonable optimization. Though, my understanding so far was 
that commits to a branch are actually persisted. After all, we use the same 
method 'commit' to stage those changes in the branch and all existing MK 
implementations actually perform IO.

bq. the MK implementation has much better information about the relative costs 
of different storage accesses and can thus make better decisions about how to 
best handle branches

This pretty much means we should push down handling of the transient space to 
the MK implementation. I don't think the MK was designed with this in mind. My 
understanding so far is that we handle transient operations in oak-jcr (to a 
certain amount: RootImpl#PURGE_LIMIT) and _persist_ those changes to a branch 
once over the limit.

On the other hand I agree with you that the KernelNodeStore implementation is 
in a rather unenviable position. It doesn't know what happens in oak-jcr nor 
can it perform low level optimizations that belong into the MK.
                
> Avoid branch/merge for small commits
> ------------------------------------
>
>                 Key: OAK-638
>                 URL: https://issues.apache.org/jira/browse/OAK-638
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Marcel Reutegger
>            Priority: Minor
>
> The branch/merge features on the MicroKernel were initially introduced to 
> stage changes of large commits. Currently oak-core creates a branch even for 
> small changes like updating a property. I think this introduces quite some 
> overhead for scenarios with highly concurrent updates. E.g. think of a 
> twitter like application or a forum with comments. Well, basically user 
> generated content. These update tend to be rather small (couple of nodes) but 
> frequent and concurrent.
> Right now oak-core always does:
> - MK.branch()
> - MK.commit() to branch
> - MK.merge()
> For small commits, it ideally should do:
> - MK.commit() to trunk

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to