Rajeev-01 commented on code in PR #13473:
URL: https://github.com/apache/hudi/pull/13473#discussion_r2188816891
##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java:
##########
@@ -504,6 +505,7 @@ public static void recover(HoodieStorage storage,
StoragePath metadataFolder) th
private static void modify(HoodieStorage storage, StoragePath
metadataFolder, Properties modifyProps, BiConsumer<Properties, Properties>
modifyFn) {
StoragePath cfgPath = new StoragePath(metadataFolder,
HOODIE_PROPERTIES_FILE);
StoragePath backupCfgPath = new StoragePath(metadataFolder,
HOODIE_PROPERTIES_FILE_BACKUP);
+ StoragePath tempCfgPath = new StoragePath(metadataFolder,
HOODIE_PROPERTIES_FILE + HOODIE_TEMP_FILE_SUFFIX);
Review Comment:
1. The first instant when the properties file became empty, the backup file
serve the readers.
2. When the next update came for properties file, we are checking if
properties file is not present then recover from the backup file.
3. SInce properties file is present but empty, we won't recover from backup
file and we will delete the backup file which contains the actual properties.
4. This create both properties and backup become empty.
5. This temp file logic will make sure that the original will be present if
it has been populated correctly.
--
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]