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 Fri, 14 Mar 2014 21:43:23 GMT

On 14.3.14 1:06 , Tobias Bocanegra wrote:
> Hi,
> I tried to create users concurrently, and I get a constraint violation:
> "Cannot create user/group: Intermediate folders must be of type
> rep:AuthorizableFolder."
> on the "addExistingNode" parent, because the User validator traverses
> up the following tree:
> "/rep:security/rep:authorizables/rep:users/:conflict/addExistingNode/u/us/user-5"

This is already strange. 
o.a.j.o.plugins.commit.JcrConflictHandler#JCR_CONFLICT_HANDLER should 
run before any other hook (see o.a.j.o..jcr.Jcr#Jcr(Oak)). This conflict 
handler replaces the :conflict markers with rep:MergeConflict markers. 
Later in the chain of hooks 
o.a.j.o..plugins.commit.ConflictValidatorProvider fails the commit when 
there are unresolved conflicts. I.e. when there are rep:MergeConflict 
markers left.

> How should this work? should the user validator stop on the
> ":conflict" node? btw: there is never a real conflict here. all nodes
> are the same.

I vaguely remember that we might have though this to be too expensive, 
but I might be wrong.
The AbstractRebaseDiff (which is the in memory version for conflict 
handling) certainly behaves as Toby describes. Jukka, Marcel what about 
the respective node store implementations? We might even have different 
behaviours here depending on who does the diffing.


> regards, toby

View raw message