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


##########
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:
   I haven't made a decision on how to resolve conflicts for 
`writeOperationType.UNKNOWN` operation yet. Here, I've adopted a conservative 
approach, even when NB-CC is enabled,  `writeOperationType.UNKNOWN` operation 
cannot skip the conflict resolution step.



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