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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -2616,6 +2617,22 @@ public Integer getWritesFileIdEncoding() {
     return props.getInteger(WRITES_FILEID_ENCODING, 
HoodieMetadataPayload.RECORD_INDEX_FIELD_FILEID_ENCODING_UUID);
   }
 
+  public boolean needResolveWriteConflict(Option<WriteOperationType> 
operationType) {
+    if (getWriteConcurrencyMode().supportsOptimisticConcurrencyControl()) {
+      // Skip to resolve conflict for non bulk_insert operation if using 
non-blocking concurrency control
+      // TODO: skip resolve conflict if the option is empty or the inner 
operation type is UNKNOWN ?
+      return !isNonBlockingConcurrencyControl() || 
mayBeBulkInsert(operationType);

Review Comment:
   Remove the Option from the param and change the logic to:
   
   ```java
   return  BULK_INSERT.equals(operationType.get()) || 
!isNonBlockingConcurrencyControl()
   ```



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to