Rajeev-01 commented on code in PR #13473:
URL: https://github.com/apache/hudi/pull/13473#discussion_r2288200767


##########
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:
   > It looks like what is really problematic is the #recoverIfNeeded, it just 
check the file existence of the cfgPath but not the checksum, which could incur 
empty files like you mentioned.
   
   Yeah exactly. I can address this is next PR
   
   > I did't see the issues, just try to understand why this is needed, we 
already have backup file and checksum validation for cfg file, when the file is 
empty, the checksum would be invalid, and the reader would just read from 
backup file.
   
   Just think if this issue happened twice in a row in a different manner.
   first actual pros will get empty 
   Next one since actual file is present and we will drop the backup file which 
contains actual props 
   and while populating the backup again we will end up in 0 bytes for the back 
up as well.



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