Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-3975

Checksum can be wrong after table upgrade from version 3 to 4

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Problem
    • None
    • 0.11.0
    • 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;
      } 

      Attachments

        Activity

          People

            guoyihua Ethan Guo (this is the old account; please use "yihua")
            guoyihua Ethan Guo (this is the old account; please use "yihua")
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: