danny0405 commented on code in PR #9896:
URL: https://github.com/apache/hudi/pull/9896#discussion_r1367619653
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -2616,10 +2617,17 @@ public Integer getWritesFileIdEncoding() {
return props.getInteger(WRITES_FILEID_ENCODING,
HoodieMetadataPayload.RECORD_INDEX_FIELD_FILEID_ENCODING_UUID);
}
- public boolean isNonBlockingConcurrencyControl() {
- return getTableType().equals(HoodieTableType.MERGE_ON_READ)
- && getWriteConcurrencyMode().supportsOptimisticConcurrencyControl()
- && isSimpleBucketIndex();
+ public boolean needResolveWriteConflict(WriteOperationType operationType) {
+ // Skip to resolve conflict for non bulk_insert operation if using
non-blocking concurrency control
+ if (getWriteConcurrencyMode().supportsOptimisticConcurrencyControl()) {
+ if (getTableType().equals(HoodieTableType.MERGE_ON_READ) &&
isSimpleBucketIndex()) {
+ return operationType == WriteOperationType.UNKNOWN || operationType ==
WriteOperationType.BULK_INSERT;
+ } else {
+ return true;
Review Comment:
Can we simplify the logic as:
```java
return is_nb_cc ? operation == BULK_INSERT : true;
```
--
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]