the-other-tim-brown commented on code in PR #13292:
URL: https://github.com/apache/hudi/pull/13292#discussion_r2103639952


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataWriteUtils.java:
##########
@@ -84,8 +88,19 @@ public class HoodieMetadataWriteUtils {
    */
   @VisibleForTesting
   public static HoodieWriteConfig createMetadataWriteConfig(
-      HoodieWriteConfig writeConfig, HoodieFailedWritesCleaningPolicy 
failedWritesCleaningPolicy) {
+      HoodieWriteConfig writeConfig, HoodieFailedWritesCleaningPolicy 
failedWritesCleaningPolicy,
+      HoodieTableVersion datatableVersion) {
     String tableName = writeConfig.getTableName() + METADATA_TABLE_NAME_SUFFIX;
+    boolean isStreamingWritesToMetadataEnabled = 
writeConfig.isStreamingWritesToMetadataEnabled(datatableVersion);
+    WriteConcurrencyMode concurrencyMode = isStreamingWritesToMetadataEnabled
+        ? WriteConcurrencyMode.NON_BLOCKING_CONCURRENCY_CONTROL : 
WriteConcurrencyMode.SINGLE_WRITER;
+    HoodieLockConfig lockConfig = isStreamingWritesToMetadataEnabled
+        ? 
HoodieLockConfig.newBuilder().withLockProvider(InProcessLockProvider.class).build()
 : HoodieLockConfig.newBuilder().build();

Review Comment:
   Shouldn't the lock config match the data table's lock config? If there are 
multiple writers running in different JVMs, then we will need a centralized 
lock provider right?



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