[
https://issues.apache.org/jira/browse/OAK-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16064730#comment-16064730
]
angela commented on OAK-3374:
-----------------------------
[~stillalex], while the {{RepMembersConflictHandler}} looks very good to me, I
don't think that hardcoding the handler of a given user management
implementation with the {{JcrConflictHandler}} is desirable.... if we had
oak-core properly modularized at this point the {{JcrConflictHandler}} would
not be able to see it anyway...
So, I would rather suggest that we extend the {{SecurityConfiguration}}
interface such that it allows a given security module to define it's own
{{ConflictHandler}} implementations. The {{SecurityConfiguration.Default}}
could provide an 'empty' version, such that we only had to touch the
{{UserConfigurationImpl}} and expose the new {{RepMembersConflictHandler}}
there. I didn't check where the security-conflict-handlers would be grabbed and
merged together with the other conflict handlers... gut feeling would be that
this happens where the commithooks are collected upon {{Root.commit}}.
wdyt?
> Concurrent Updates of Group's Membership Results in Conflict
> ------------------------------------------------------------
>
> Key: OAK-3374
> URL: https://issues.apache.org/jira/browse/OAK-3374
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 1.3.5
> Reporter: Dominique Jäggi
> Assignee: Alex Deparvu
> Attachments:
> OAK-3374_-_Concurrent_Updates_of_Group_s_Membership_Results_in_Conflict.patch,
> OAK-3374.patch
>
>
> when concurrently updating the _rep:members_ property of a group principal, a
> merge conflict occurs:
> {noformat}
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001:
> Unresolved conflicts in /home/groups/a/administrators
> at
> org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:84)
> at
> org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.propertyChanged(ConflictValidator.java:60)
> at
> org.apache.jackrabbit.oak.spi.commit.CompositeEditor.propertyChanged(CompositeEditor.java:91)
> at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.propertyChanged(EditorDiff.java:93)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareProperties(SegmentNodeState.java:596)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:456)
> at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> at
> org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:418)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)
> at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> at
> org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:418)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)
> at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> at
> org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:418)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)
> at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> at
> org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:487)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)
> at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
> at
> org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)
> at
> org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)
> at
> org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.prepare(SegmentNodeStore.java:405)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.optimisticMerge(SegmentNodeStore.java:428)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.execute(SegmentNodeStore.java:484)
> at
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.merge(SegmentNodeStore.java:162)
> at
> org.apache.jackrabbit.oak.spi.state.ProxyNodeStore.merge(ProxyNodeStore.java:43)
> at
> org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:247)
> at
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:313)
> at
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:459)
> ... 77 common frames omitted
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)