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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -2616,6 +2617,19 @@ public Integer getWritesFileIdEncoding() {
     return props.getInteger(WRITES_FILEID_ENCODING, 
HoodieMetadataPayload.RECORD_INDEX_FIELD_FILEID_ENCODING_UUID);
   }
 
+  public boolean needResolveWriteConflict(WriteOperationType operationType) {
+    if (getWriteConcurrencyMode().supportsOptimisticConcurrencyControl()) {
+      // Skip to resolve conflict for non bulk_insert operation if using 
non-blocking concurrency control
+      return !isNonBlockingConcurrencyControl() || 
maybeBulkInsert(operationType);
+    } else {
+      return false;
+    }
+  }
+
+  private boolean maybeBulkInsert(WriteOperationType operationType) {
+    return operationType == WriteOperationType.UNKNOWN || operationType == 
WriteOperationType.BULK_INSERT;

Review Comment:
   You need to make it clear because in 
`[TransactionUtils.java](https://github.com/apache/hudi/pull/9896/files#diff-09f645e892253b62a07fdf3719bac75aca166da7c0758fad832d8cf855684eb6)`,
 you use `UNKNOWN` as the fallback type.



-- 
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