jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Making merging changes from concurrent commits more intelligent
Date Thu, 20 Mar 2014 15:38:05 GMT


This came up with OAK-1541 where nodes are being added from multiple 
sessions concurrently:

Session 1: root.addNode("a").addNode("b");
Session 2: root.addNode("a").addNode("c");

This currently fails for whichever session saves last because node a is 
different from the already existing node a. The MicroKernel contract 
makes this precise: "addExistingNode: a node has been added that is 
different from a node of them same name that has been added to the trunk."

In OAK-1553 I proposed to relax this contract such that concurrently 
added nodes could be merged. For the above case the resulting tree would 
then be

root:{a:{b:{}, c:{}}}

However note that this differs very much from what you usually would get 
on Jackrabbit 2 when same name siblings enter the stage:

root:{a[1]/b:{}, a[2]/c:{}}

I understand that to be able to add users concurrently (OAK-1541) we 
need more intelligent merging. However doing so will change the 
behaviour wrt. Jackrabbit 2 quite significantly.



[1] https://issues.apache.org/jira/browse/OAK-1541
[2] https://issues.apache.org/jira/browse/OAK-1553

View raw message