stefan-egli commented on code in PR #2293: URL: https://github.com/apache/jackrabbit-oak/pull/2293#discussion_r2086491181
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java: ########## @@ -417,4 +418,11 @@ name = "Enable Full GC Persistent Audit Logging", description = "This parameter will enable/disable the saving of deleted document IDs and properties during FullGC into a persistent storage, e.g Mongo collection") boolean fullGCAuditLoggingEnabled() default false; + + @AttributeDefinition( + name = "Avoid Exclusive Merge lock", + description = "Boolean value indicating whether we need to avoid the exclusive merge lock while " + + "merging the changes in case of a conflict. The Default value is " + DEFAULT_AVOID_MERGE_LOCK + + " Note that this value can be overridden via framework property 'oak.documentstore.avoidMergeLock'") + boolean avoidMergeLock() default DEFAULT_AVOID_MERGE_LOCK; Review Comment: doesn't have to be everywhere else, but just wondered if the config param should contain the word `exclusive` - just to be more in line with the code, so eg ```suggestion boolean avoidExclusiveMergeLock() default DEFAULT_AVOID_MERGE_LOCK; ``` ########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java: ########## @@ -122,9 +125,9 @@ public NodeState merge(@NotNull CommitHook hook, @NotNull CommitInfo info) throw e; } } - // retry with exclusive lock, blocking other + // retry with exclusive lock (if avoidMergeLock is not enabled), blocking other // concurrent writes - return merge0(hook, info, true); + return merge0(hook, info, !avoidMergeLock); Review Comment: in case of `!avoidMergeLock` do you even want to do another retry? `merge0` already does a number of retries (depending on value of `maximumBackoff`) - I'd argue that if that fails and `avoidMergeLock` is true it should just rethrow the `e` above -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org