You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Ethan Guo (Jira)" <ji...@apache.org> on 2022/04/30 00:05:00 UTC
[jira] [Commented] (HUDI-3975) Checksum can be wrong after table upgrade from version 3 to 4
[ https://issues.apache.org/jira/browse/HUDI-3975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17530272#comment-17530272 ]
Ethan Guo commented on HUDI-3975:
---------------------------------
After syncing, this is not an issue for now, since we only generate checksum based on the database and table names.
> Checksum can be wrong after table upgrade from version 3 to 4
> -------------------------------------------------------------
>
> Key: HUDI-3975
> URL: https://issues.apache.org/jira/browse/HUDI-3975
> Project: Apache Hudi
> Issue Type: Bug
> Reporter: Ethan Guo
> Assignee: Ethan Guo
> Priority: Blocker
> Fix For: 0.11.0
>
>
> In ThreeToFourUpgradeHandler, more table properties can be added after checksum is generated, causing the checksum to be wrong.
> {code:java}
> @Override
> public Map<ConfigProperty, String> upgrade(HoodieWriteConfig config, HoodieEngineContext context, String instantTime, SupportsUpgradeDowngrade upgradeDowngradeHelper) {
> Map<ConfigProperty, String> tablePropsToAdd = new Hashtable<>();
> 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());
> }
> return tablePropsToAdd;
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)