On 15.1.13 12:19, Marcel Reutegger wrote:
In a nutshell here is what I think we should do: MK.commit should fail
on all but conflicts which are trivially merged. This will not be a
problem for oak-core since oak-core applies changes to private branches
and will merge these on Session.save. Before merging, branches are
rebased and that's the place where the more complicated conflict
handling should go. Due to rebasing the subsequent merge will not
conflict any more.
this involves retrying the commit, which is not the case currently, right?
Yes, there is no retrying currently. However, this is the base for being
able to retry. See also https://issues.apache.org/jira/browse/OAK-442
does that mean in the near future a MK should always fail early as soon
as it detects it need to merge something?
On MK.commit yes I think this is currently the best thing to do. Since
we do conflict resolution on the private branch anyway, I don't see much
need for trying hard to merge stuff on MK.commit. A better approach
would be to optimize conflict handling through being able to rebase
private branches before merging them. This is exactly what I'm POCing
here: https://github.com/mduerig/jackrabbit-oak/commits/OAK-536
See my POC work on https://issues.apache.org/jira/browse/OAK-536 for
how
such a rebase operation could look like. Note that the current
implementation is not complete yet since it just throws an exception on
conflicts. I will soon update this to a more complete implementation
which correctly annotates conflicts such that oak-core can further
handle these.
are you referring to an implementation in oak-mongomk?
Eventually yes. My POC currently only covers the H2 MK though.
Michael
regards
marcel