Skip to content

Conversation

@deniskuzZ
Copy link
Member

@deniskuzZ deniskuzZ commented Jan 27, 2026

What changes were proposed in this pull request?

  1. Replaced assert with an exception in TxnUtils#createValidTxnListForCleaner
  2. Fixed findReadyToClean eligibility condition in ReadyToCleanHandler
    (i.e. CQ_HIGHEST_WRITE_ID < MIN_OPEN_WRITE_ID - 1)
  3. Removed redundant addWriteIdsToMinHistory from AcidCompactionService

Why are the changes needed?

Compaction retries triggered by timeouts under an incorrect configuration pose a risk of data loss. If a compaction is re-attempted before the prior attempt has completed or been properly aborted, the Cleaner may observe multiple base directories with the same writeId and erroneously delete all of them.

Does this PR introduce any user-facing change?

No

How was this patch tested?

TestCleanerWithMinHistoryWriteId

@sonarqubecloud
Copy link

@deniskuzZ deniskuzZ changed the title [DRAFT] ACID: Fix Cleaner processing of retried compaction attempts previously killed HIVE-29420: Hive ACID: Cleaner mishandles retries of killed compactions Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants