Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22593

Dynamically partitioned MM (insert-only ACID) tables don't compact automatically

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • None
    • None

    Description

      Dynamic partitions of MM tables aren't entered into the HMS table TXN_COMPONENTS. On inserting into such tables we see this line in the HMS log:

      Expected to move at least one record from txn_components to completed_txn_components when committing txn!

      (This is not the case for non-partitioned MM tables.)

      Since the partitions aren't entered into COMPLETED_TXN_COMPONENTS, they aren't considered for automatic compaction.

      Probably the culprit is org.apache.hadoop.hive.ql.metadata.Hive#loadDynamicPartitions which has an isAcid parameter that is always false regarding MM tables, and also because MM tables' "write type" is AcidUtils.Operation.NOT_ACID and not INSERT.

      Attachments

        1. HIVE-22593.01.patch
          7 kB
          Karen Coppage
        2. HIVE-22593.01.patch
          7 kB
          Karen Coppage
        3. HIVE-22593.02.patch
          8 kB
          Karen Coppage
        4. HIVE-22593.03.patch
          30 kB
          Karen Coppage
        5. HIVE-22593.04.patch
          32 kB
          Karen Coppage
        6. HIVE-22593.04.patch
          32 kB
          Karen Coppage

        Activity

          People

            klcopp Karen Coppage
            klcopp Karen Coppage
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: