codope commented on code in PR #10804:
URL: https://github.com/apache/hudi/pull/10804#discussion_r1510616751
##########
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/HoodieSparkFunctionalIndexClient.java:
##########
@@ -122,11 +124,25 @@ private static boolean indexExists(HoodieTableMetaClient
metaClient, String inde
private static Map<String, String> buildWriteConfig(HoodieTableMetaClient
metaClient, HoodieFunctionalIndexDefinition indexDefinition) {
Map<String, String> writeConfig = new HashMap<>();
if (metaClient.getTableConfig().isMetadataTableAvailable()) {
- if
(!writeConfig.containsKey(HoodieLockConfig.LOCK_PROVIDER_CLASS_NAME.key())) {
- writeConfig.put(HoodieWriteConfig.WRITE_CONCURRENCY_MODE.key(),
WriteConcurrencyMode.OPTIMISTIC_CONCURRENCY_CONTROL.name());
-
writeConfig.putAll(JavaConverters.mapAsJavaMapConverter(HoodieCLIUtils.getLockOptions(metaClient.getBasePathV2().toString())).asJava());
- }
+ writeConfig.put(HoodieWriteConfig.WRITE_CONCURRENCY_MODE.key(),
WriteConcurrencyMode.OPTIMISTIC_CONCURRENCY_CONTROL.name());
+
writeConfig.putAll(JavaConverters.mapAsJavaMapConverter(HoodieCLIUtils.getLockOptions(metaClient.getBasePathV2().toString())).asJava());
+
+ // [HUDI-7472] Ensure write-config contains the existing MDT partition
to prevent those from getting deleted
+
metaClient.getTableConfig().getMetadataPartitions().forEach(partitionPath -> {
Review Comment:
Good catch!
--
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]