danny0405 commented on code in PR #9933:
URL: https://github.com/apache/hudi/pull/9933#discussion_r1375153204


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -2638,19 +2638,23 @@ public Integer getWritesFileIdEncoding() {
   }
 
   public boolean needResolveWriteConflict(WriteOperationType operationType) {
-    if (getWriteConcurrencyMode().supportsOptimisticConcurrencyControl()) {
-      // NB-CC don't need to resolve write conflict except bulk insert 
operation
-      return WriteOperationType.BULK_INSERT == operationType || 
!isNonBlockingConcurrencyControl();
-    } else {
-      // SINGLE_WRITER case don't need to resolve write conflict
-      return false;
+    WriteConcurrencyMode mode = getWriteConcurrencyMode();
+    boolean needResolveConflict;
+    switch (mode) {
+      case SINGLE_WRITER:
+        needResolveConflict = false;

Review Comment:
   Return directly ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to