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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -176,6 +186,33 @@ public void run(HoodieTableVersion toVersion, String 
instantTime) {
 
     HoodieTableConfig.update(metaClient.getStorage(),
         metaClient.getMetaPath(), metaClient.getTableConfig().getProps());
+
+    if (metaClient.getTableConfig().isMetadataTableAvailable() && 
toVersion.equals(HoodieTableVersion.SIX) && isDowngrade) {
+      // NOTE: Add empty deltacommit to metadata table. The compaction instant 
format has changed in version 8.
+      //       It no longer has a suffix of "001" for the compaction instant. 
Due to that, the timeline instant
+      //       comparison logic in metadata table will fail after LSM timeline 
downgrade.
+      //       To avoid that, we add an empty deltacommit to metadata table in 
the downgrade step.
+      TypedProperties typedProperties = config.getProps();
+      
typedProperties.setProperty(HoodieMetadataConfig.ENABLE_METADATA_INDEX_COLUMN_STATS.key(),
 "false");
+      
typedProperties.setProperty(HoodieMetadataConfig.ENABLE_METADATA_INDEX_PARTITION_STATS.key(),
 "false");

Review Comment:
   I am aligned with keeping the two disabled if tv=6 even with 1.0 writer. 
Removed for now.



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