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

Compaction Cleaner prematurely cleans up deltas

    XMLWordPrintableJSON

Details

    Description

      SinceĀ HIVE-23107 the cleaner can clean up deltas that are still used by running queries.

      Example:

      • TxnId 1-5 writes to a partition, all commits
      • Compactor starts with txnId=6
      • Long running query starts with txnId=7, it sees txnId=6 as open in its snapshot
      • Compaction commits
      • Cleaner runs

      Previously min_history_level table would have prevented the Cleaner to delete the deltas1-5 until txnId=7 is open, but now they will be deleted and the long running query may fail if its tries to access the files.

      Solution could be to not run the cleaner until any txn is open that was opened before the compaction was committed (CQ_NEXT_TXN_ID)

      Attachments

        Issue Links

          Activity

            People

              pvargacl Peter Varga
              pvargacl Peter Varga
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m