You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/03/31 03:23:58 UTC

[GitHub] [hudi] zhangyue19921010 commented on a change in pull request #4693: [HUDI-2488][HUDI-3175] Implement async metadata indexing

zhangyue19921010 commented on a change in pull request #4693:
URL: https://github.com/apache/hudi/pull/4693#discussion_r839136167



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/ThreeToFourUpgradeHandler.java
##########
@@ -35,7 +40,12 @@
   @Override
   public Map<ConfigProperty, String> upgrade(HoodieWriteConfig config, HoodieEngineContext context, String instantTime, SupportsUpgradeDowngrade upgradeDowngradeHelper) {
     Map<ConfigProperty, String> tablePropsToAdd = new Hashtable<>();
-    tablePropsToAdd.put(HoodieTableConfig.TABLE_CHECKSUM, String.valueOf(HoodieTableConfig.generateChecksum(config.getProps())));
+    tablePropsToAdd.put(TABLE_CHECKSUM, String.valueOf(HoodieTableConfig.generateChecksum(config.getProps())));
+    // if metadata is enabled and files partition exist then update TABLE_METADATA_INDEX_COMPLETED
+    // schema for the files partition is same between the two versions
+    if (config.isMetadataTableEnabled() && metadataPartitionExists(config.getBasePath(), context, MetadataPartitionType.FILES)) {
+      tablePropsToAdd.put(TABLE_METADATA_PARTITIONS, MetadataPartitionType.FILES.getPartitionPath());
+    }

Review comment:
       Hi @codope Just thinking, when user set current version is 4 which means there is no need for upgrade/downgrade. Then how can we update the `TABLE_METADATA_PARTITIONS ` column here?




-- 
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-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org