yihua commented on a change in pull request #5207:
URL: https://github.com/apache/hudi/pull/5207#discussion_r840974343



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java
##########
@@ -1924,6 +1930,9 @@ public int getMetadataCleanerCommitsRetained() {
    * Hoodie Client Lock Configs.
    * @return
    */
+  public boolean isAutoAdjustLockConfigs() {
+    return getBoolean(AUTO_ADJUST_LOCK_CONFIGS);

Review comment:
       nit: should this be `getBooleanOrDefault()` or it doesn't matter

##########
File path: 
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/config/TestHoodieWriteConfig.java
##########
@@ -181,13 +184,31 @@ public void 
testAutoConcurrencyConfigAdjustmentWithTableServices(HoodieTableType
             put(INLINE_COMPACT.key(), "true");
             put(AUTO_CLEAN.key(), "true");
             put(ASYNC_CLEAN.key(), "false");
+            put(HoodieWriteConfig.AUTO_ADJUST_LOCK_CONFIGS.key(), "true");
           }
         }), Option.of(true), Option.of(false), Option.of(true),
         WriteConcurrencyMode.valueOf(WRITE_CONCURRENCY_MODE.defaultValue()),
         
HoodieFailedWritesCleaningPolicy.valueOf(FAILED_WRITES_CLEANER_POLICY.defaultValue()),
         HoodieLockConfig.LOCK_PROVIDER_CLASS_NAME.defaultValue());
   }
 
+  @Test
+  public void testAutoAdjustLockConfigs() {

Review comment:
       nit: parameterize this test for both COW and MOR?

##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java
##########
@@ -464,6 +464,12 @@
       .sinceVersion("0.11.0")
       .withDocumentation("Control to enable release all persist rdds when the 
spark job finish.");
 
+  public static final ConfigProperty<Boolean> AUTO_ADJUST_LOCK_CONFIGS = 
ConfigProperty
+      .key("hoodie.auto.adjust.lock.configs")
+      .defaultValue(false)
+      .sinceVersion("0.11.0")
+      .withDocumentation("Auto adjust lock configurations when metadata is 
enabled and for async table services.");

Review comment:
       nit: `metadata` -> `metadata table `




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