lokeshj1703 commented on code in PR #14121:
URL: https://github.com/apache/hudi/pull/14121#discussion_r2447620005
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -187,6 +187,16 @@ public void run(HoodieTableVersion toVersion, String
instantTime) {
// Perform rollback and compaction only if a specific handler requires it,
before upgrade/downgrade process
performRollbackAndCompactionIfRequired(fromVersion, toVersion, isUpgrade);
+ // When downgrade from version > 8 to version <= 8, non-V1 index
partitions should be removed.
+ // If we handle this logic within nine-to-eight downgrade handler, this
operation would refresh
+ // MDT's hoodie.properties, as causes conflicts with MDT downgrade handler
since MDT downgrade
+ // happens before DT downgrade.
+ if (fromVersion.greaterThanOrEquals(HoodieTableVersion.NINE)
+ && toVersion.lesserThan(HoodieTableVersion.NINE)) {
+ UpgradeDowngradeUtils.dropNonV1IndexPartitions(
+ config, context, metaClient, upgradeDowngradeHelper,
+ "downgrading from a table version > 8 to a version <= 8");
+ }
Review Comment:
Should we introduce an API like preDowngrade for this functionality? It
might be better than having the logic in UpgradeDowngrade.
--
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]