bvaradar commented on code in PR #12327:
URL: https://github.com/apache/hudi/pull/12327#discussion_r1861562018
##########
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()));
Review Comment:
Open questions:
1. If the table version is < 6 and user deploys 1.x code with autoUpgrade =
false, should we upgrade to table version 6 and stop or error out asking user
to upgrade with 0.15 code first ?
2. Should we nuke metadata table when autoUpgrade == true ?
3. If we are supporting metadata table with writer version 6, we need to
test this scenario or should we nuke metadata table when 1.x code is deployed
?
--
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]