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

Jukka Zitting commented on OAK-464:
-----------------------------------

bq. I'm worried that it is not possible to (correctly) solve all possible 
conflicts within the MicroKernel.

The MK already needs to deal with conflicts. How otherwise would you deal with 
the above-mentioned situation?

{code}
String base = mk.getHeadRevision();
mk.commit("/", ">/a:/b", base, null);
mk.commit("/", "+/a/x:0", base, null);
{code}

Note that I think it's fine if the MK chooses to simply throw an exception in 
such a case. The main point here is that the MK in any case needs to have at 
least some mechanism of dealing with conflicts. Why would we want or need to 
implement the same thing also in oak-core?

bq. To me it sounds like you want to avoid complexity in oak-core and therefore 
request to implement it in the MicroKernel.

Indeed, especially since the MK in any case needs (and already to a degree has) 
this logic for dealing with normal commits.

bq. My question was, what should the MicroKernel do if one of the commit fails 
because of a conflict.

ACK. That's up to the MK to decide, a simple implementation could for example 
just throw an exception. IMO it's better if that case is handled in exactly the 
same manner as the above code snippet gets handled, instead of oak-core having 
its own, slightly different way of handling conflicts.
                
> RootImpl.rebase() doesn't handle move operations correctly
> ----------------------------------------------------------
>
>                 Key: OAK-464
>                 URL: https://issues.apache.org/jira/browse/OAK-464
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Michael Dürig
>
> Doing {{RootImpl.rebase()}} causes moves to be changed to remove followed by 
> add. Which causes moves of large sub trees to become very expensive.

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