xiarixiaoyao commented on code in PR #8542:
URL: https://github.com/apache/hudi/pull/8542#discussion_r1174531825
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -2483,8 +2483,15 @@ public boolean areReleaseResourceEnabled() {
/**
* Returns whether the explicit guard of lock is required.
*/
- public boolean needsLockGuard() {
- return isMetadataTableEnabled() ||
getWriteConcurrencyMode().supportsOptimisticConcurrencyControl();
+ public boolean isLockRequired() {
+ return !isDefaultLockProvider() ||
getWriteConcurrencyMode().supportsOptimisticConcurrencyControl();
Review Comment:
Default lock provider is zk lock.
i guess that when MDT enabled, **autoAdjustConfigsForConcurrencyMode**()
will set InProcessLockProvider to LockProvider, so we use
isDefaultLockProvider() instead of isMetadataTableEnabled()
--
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]