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 Re: concurrent creation of users
Date Mon, 17 Mar 2014 10:28:47 GMT


On 16.3.14 6:34 , Tobias Bocanegra wrote:
> Hi,
>
>
> On Sat, Mar 15, 2014 at 8:02 AM, Michael Dürig <mduerig@apache.org> wrote:
>> Ah I see. The respective validators are missing from the test setup. But
>> maybe this was done intentionally? I can't really tell. However If I add the
>> and run the test I get stack traces that resemble more what I would expect:
>
> yes. but the change is trivial. there are 2 commits adding the same
> childnode to a parent. the childnode is identical in name, properties
> and type, and is not referenceable.

I'm however also seeing real conflicts in that test case like:

+"/rep:security/rep:authorizables/rep:users/f":{
   "jcr:primaryType":"nam:rep:AuthorizableFolder",
   "fo":{
     "jcr:primaryType":"nam:rep:AuthorizableFolder",
	"foo-user-2":{
	 
"rep:password":"{SHA-256}f65757d780eb4850-1000-f3c2a571c41ff56f879ccc94ae151012d9b9c2bf970a0407f982ad06df1a043e",
	  "rep:principalName":"foo-user-2",
	  "rep:authorizableId":"foo-user-2",
	  "jcr:uuid":"651a0628-4ed9-3db8-b98e-ca6dcd92f615",
	  "jcr:primaryType":"nam:rep:User"}}}
	

+"/rep:security/rep:authorizables/rep:users/f":{
   "jcr:primaryType":"nam:rep:AuthorizableFolder",
   "fo":{
     "jcr:primaryType":"nam:rep:AuthorizableFolder",
     "foo-user-1":{
	 
"rep:password":"{SHA-256}5080678fba260f84-1000-a76311735279849147b390c96f6f8a0f92736ca25991d88349fb26b1c17578d1",
	  "rep:principalName":"foo-user-1",
	  "rep:authorizableId":"foo-user-1",
	  "jcr:primaryType":"nam:rep:User",
	  "jcr:uuid":"95427c0c-ac0b-3f4c-a6fe-a25d8781d263"}}}

This causes a conflict since the new node f is not the same in both 
cases. See the Javadoc of 
org.apache.jackrabbit.mk.api.MicroKernel#rebase for what constitutes a 
conflict.

Michael

>
> this is a typical use-case in highly concurrent systems, so I think
> that we should find a solution that can merge trivial changes.
> regards, toby
>

Mime
View raw message