codope commented on code in PR #11406: URL: https://github.com/apache/hudi/pull/11406#discussion_r1629979770
########## hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java: ########## @@ -623,6 +624,8 @@ private static void initTableMetaClient(StorageConfiguration<?> storageConf, Str } initializeBootstrapDirsIfNotExists(basePath, storage); + // When the table is initialized, set the initial version to be the current version. + props.put(INITIAL_VERSION.key(), String.valueOf(HoodieTableVersion.current().versionCode())); Review Comment: Are there no other callers of this method apart from `initTable`? It's important that the INITIAL_VERSION is not changed later due to offline/manual action right. ########## hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java: ########## @@ -116,6 +116,13 @@ public class HoodieTableConfig extends HoodieConfig { .withDocumentation("Version of table, used for running upgrade/downgrade steps between releases with potentially " + "breaking/backwards compatible changes."); + public static final ConfigProperty<HoodieTableVersion> INITIAL_VERSION = ConfigProperty + .key("hoodie.table.initial.version") + .defaultValue(HoodieTableVersion.ZERO) + .withDocumentation("Initial Version of table when the table was created.Used for upgrade/downgrade" Review Comment: ```suggestion .withDocumentation("Initial Version of table when the table was created. Used for upgrade/downgrade" ``` -- 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