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

Marcel Reutegger commented on OAK-535:
--------------------------------------

Now that I think more about this, I'd even go as far as ripping out all the 
merge code from MergeCommand.

If we look at MergeCommand and what it is supposed to do, then it's basically 
gathering all the commits from the branch and apply it to trunk based on the 
branch root revision. That's the same as calling MK.commit() with the combined 
branch commit diffs and the branch root revision. The point is, MK.commit() 
must implement he rebase anyway and CommitCommand does that already, but IMO 
insufficiently. I think detecting concurrent and possibly conflicting commits 
and performing the merge should be done in CommitCommand 
(CommitCommand.readAndMergeExistingNodes()). MergeCommand will then simply 
gather the diffs and pass it to CommitCommand.
                
> MergeCommand reads complete tree into memory
> --------------------------------------------
>
>                 Key: OAK-535
>                 URL: https://issues.apache.org/jira/browse/OAK-535
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mongomk
>    Affects Versions: 0.5
>            Reporter: Marcel Reutegger
>         Attachments: mergecommandoptimization.patch, mergefixattempt.patch, 
> movepatch.diff, moves-in-commit.patch, OAK-535.patch
>
>
> Merging commits to a branch back to head in MongoMK calls MergeCommand, which 
> reads the complete tree into memory. The more content is in the repository, 
> the longer it takes to store even a simple update as a property change.

--
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