danny0405 commented on code in PR #8542:
URL: https://github.com/apache/hudi/pull/8542#discussion_r1174532773


##########
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:
   Yes, to be compatible with the exising behavior, if the lock provider is 
reset by auto adjust, then it means it is definite that the lock is required.
   
   MDT enabled does not mean we need a lock provider(check the premise of auto 
adjust lock actions), the change in #8111 is a little aggresive, so fix it 
altogether.



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