codope commented on a change in pull request #4712: URL: https://github.com/apache/hudi/pull/4712#discussion_r796217124
########## File path: hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java ########## @@ -272,15 +287,29 @@ private static void modify(FileSystem fs, Path metadataFolder, Properties modify /// 2. delete the properties file, reads will go to the backup, until we are done. fs.delete(cfgPath, false); // 3. read current props, upsert and save back. + String checksum; try (FSDataInputStream in = fs.open(backupCfgPath); FSDataOutputStream out = fs.create(cfgPath, true)) { - Properties props = new Properties(); + Properties props = new TypedProperties(); props.load(in); modifyFn.accept(props, modifyProps); + if (props.containsKey(TABLE_CHECKSUM.key()) && validateChecksum(props)) { + checksum = props.getProperty(TABLE_CHECKSUM.key()); + } else { + checksum = String.valueOf(generateChecksum(props)); + } + props.setProperty(TABLE_CHECKSUM.key(), checksum); Review comment: yeah makes sense..no need to reset the same property if it's already set. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org