beyond1920 commented on code in PR #9896: URL: https://github.com/apache/hudi/pull/9896#discussion_r1369499290
########## 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: Just to ensure the following two cases: 1. We wanna skip resolve conflict if the optionType is `Option.empty` or the inner operation type is `UNKNOWN`? 2. If the operationType is `Option.empty`, `operationType.get()` would throw `NoSuchElementException`. That's what we what? Or using `BULK_INSERT.equals(operationType.orElse(null))`? -- 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