danny0405 commented on code in PR #9896:
URL: https://github.com/apache/hudi/pull/9896#discussion_r1366594355
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/utils/TransactionUtils.java:
##########
@@ -67,8 +68,9 @@ public static Option<HoodieCommitMetadata>
resolveWriteConflictIfAny(
Option<HoodieInstant> lastCompletedTxnOwnerInstant,
boolean reloadActiveTimeline,
Set<String> pendingInstants) throws HoodieWriteConflictException {
- // Skip to resolve conflict if using non-blocking concurrency control
- if
(config.getWriteConcurrencyMode().supportsOptimisticConcurrencyControl() &&
!config.isNonBlockingConcurrencyControl()) {
+ // Skip to resolve conflict for non bulk_insert operation if using
non-blocking concurrency control
+ WriteOperationType operationType = thisCommitMetadata.orElse(new
HoodieCommitMetadata()).getOperationType();
+ if (config.needResolveWriteConflict(operationType)) {
Review Comment:
Just passaround an `Option` should be fine? There is no need to new a
`HoodieCommitMetadata()`
--
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]