Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Not A Problem
-
None
-
None
-
None
-
1
Description
In ThreeToFourUpgradeHandler, more table properties can be added after checksum is generated, causing the checksum to be wrong.
@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; }