prashantwason commented on code in PR #8609:
URL: https://github.com/apache/hudi/pull/8609#discussion_r1237637800


##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java:
##########
@@ -385,25 +409,27 @@ private static void modify(FileSystem fs, Path 
metadataFolder, Properties modify
       // 0. do any recovery from prior attempts.
       recoverIfNeeded(fs, cfgPath, backupCfgPath);
 
-      // 1. backup the existing properties.
-      try (FSDataInputStream in = fs.open(cfgPath);
-           FSDataOutputStream out = fs.create(backupCfgPath, false)) {
-        FileIOUtils.copy(in, out);
+      // 1. Read the existing config
+      TypedProperties props = fetchConfigs(fs, metadataFolder.toString());
+
+      // 2. backup the existing properties.
+      try (FSDataOutputStream out = fs.create(backupCfgPath, false)) {
+        storeProperties(props, out);
       }

Review Comment:
   For the hoodie.properties updates caused by MDT in multi-writer there should 
already be locking as all MDT operations are performed under the dataset lock 
already. For multi-writer scenarios locking is already required.
   
   In non-MDT cases, I don't see any properties that are updated generally by 
multiple-writers. So the risk of this writer-writer conflict is very low.



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