Skip to content

HIVE-29572: ACID Compaction: Cleaner should mark a compaction failed when its txn is aborted#6498

Open
kuczoram wants to merge 1 commit into
apache:masterfrom
kuczoram:HIVE-29572
Open

HIVE-29572: ACID Compaction: Cleaner should mark a compaction failed when its txn is aborted#6498
kuczoram wants to merge 1 commit into
apache:masterfrom
kuczoram:HIVE-29572

Conversation

@kuczoram
Copy link
Copy Markdown
Contributor

@kuczoram kuczoram commented May 18, 2026

What changes were proposed in this pull request?###

When a compaction is fetched by the cleaner, first check the state of the compaction's transaction. If it is already aborted, delete nothing, but mark the compaction as failed.

Why are the changes needed?###

It can happen that a compaction is marked as finished and get into "ready for cleaning" state, but the compaction txn stays open. And when the timeout reached, the txn gets aborted.
With min.history.level, a compaction like this can block the cleaning for all consecutive compaction, even after the txn is aborted.

Does this PR introduce any user-facing change?###

No

How was this patch tested?###

The scenarios are covered in TestCleaner unit test.

@kuczoram kuczoram changed the title [WIP] HIVE-29572: ACID Compaction: Cleaner should check the state of the compaction txn before start cleaning HIVE-29572: Cleaner should mark a compaction failed when its txn is aborted May 22, 2026
@kuczoram kuczoram changed the title HIVE-29572: Cleaner should mark a compaction failed when its txn is aborted HIVE-29572: ACID Compaction: Cleaner should mark a compaction failed when its txn is aborted May 22, 2026
@sonarqubecloud
Copy link
Copy Markdown

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