[ https://issues.apache.org/jira/browse/OAK-4321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15263232#comment-15263232 ]
Vikas Saurabh commented on OAK-4321: ------------------------------------ [~mreutegg], probably the minimalist of fixes can be like: {noformat} --- a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java +++ b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java @@ -557,6 +557,8 @@ public class Commit { private String formatConflictRevision(Revision r) { if (nodeStore.getHeadRevision().isRevisionNewer(r)) { return r + " (not yet visible)"; + } if (baseRevision != null && !baseRevision.isRevisionNewer(r)) { + return r + " (older than base - " + baseRevision + ")"; } else { return r.toString(); } {noformat} What I'm finding harder is to write test cases to create invalid conflicts - any pointers? In the mean time I'm also looking at some code paths in {{checkConflicts}} to see if we are covering all cases. > Improve conflict exception message to show if conflict is unexpected > -------------------------------------------------------------------- > > Key: OAK-4321 > URL: https://issues.apache.org/jira/browse/OAK-4321 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core, documentmk > Reporter: Vikas Saurabh > Assignee: Vikas Saurabh > Priority: Minor > Labels: candidate_oak_1_0, candidate_oak_1_2, candidate_oak_1_4 > Fix For: 1.6 > > > Merge exception (aka OakMergeXXXX) are often expected when concurrent > sessions do conflicting writes. But in some occasions, we've seen bugs in oak > which also lead to merge exception. > This creates confusion during investigation to isolate if it's an issue in > oak or a genuine concurrent conflict. > It'd be useful if the exception message has information to distinguish that. -- This message was sent by Atlassian JIRA (v6.3.4#6332)