codope commented on code in PR #12327:
URL: https://github.com/apache/hudi/pull/12327#discussion_r1860962295


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/SevenToEightUpgradeHandler.java:
##########
@@ -62,19 +78,38 @@ public class SevenToEightUpgradeHandler implements 
UpgradeHandler {
   @Override
   public Map<ConfigProperty, String> upgrade(HoodieWriteConfig config, 
HoodieEngineContext context,
                                              String instantTime, 
SupportsUpgradeDowngrade upgradeDowngradeHelper) {
+    Map<ConfigProperty, String> tablePropsToAdd = new HashMap<>();
     HoodieTable table = upgradeDowngradeHelper.getTable(config, context);
     HoodieTableMetaClient metaClient = table.getMetaClient();
     HoodieTableConfig tableConfig = metaClient.getTableConfig();
+    // If auto upgrade is disabled, set initial version and writer version to 
6 and return
+    if (!config.autoUpgrade()) {
+      setInitialVersion(config, table.getMetaClient().getTableConfig(), 
tablePropsToAdd);
+      config.setValue(HoodieWriteConfig.WRITE_TABLE_VERSION, 
String.valueOf(HoodieTableVersion.SIX.versionCode()));
+      return tablePropsToAdd;
+    }

Review Comment:
   this block is to ensure the migration protocol i.e. users can upgrade the 
binaries but still continue to write in tv=6 (no auto upgrade).



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