[
https://issues.apache.org/jira/browse/OAK-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13565408#comment-13565408
]
Michael Dürig commented on OAK-535:
-----------------------------------
>From the oak-core perspective the important part here is the fast forward
>merge. That is, the merge where there are no changes on trunk.
Since oak-core has not enough information to handle the case where a merge
conflicts (see OAK-496), the current implementation of oak-core rebases a
branch on top of the current trunk and then merges the rebased trunk. Since the
current MicroKernel does not expose any rebase functionality (OAK-536) oak-core
implements rebasing by creating a new branch and applying all changes from the
current branch to that new branch. Apart from being expensive (wasting
branches, additional round trips), this also suffers from the same [race
condition Mete
describes|https://issues.apache.org/jira/browse/OAK-535?focusedCommentId=13565288&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13565288]
only worse since this is exposed over component boundaries.
So, since oak-core doesn't care too much about the conflict case on merge but
quite in the contrary, I suggest not to care about this case too much. I think
it is fine to just be able to detect conflicts and throw an exception in this
case. Make it dead simple: there is a conflict in merging a branch to trunk
when the base revision of the trunk is not equal to the head revision of the
head. It is the responsibility of the caller to make sure that branches are
properly rebased before being merge.
See also http://markmail.org/message/wtaarmdtgyf5lvjt.
> 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