-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29420: Hive ACID: Cleaner mishandles retries of killed compactions #6281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
427c785 to
dea31f2
Compare
e7d2384 to
2313e42
Compare
558170a to
5919458
Compare
5919458 to
8af6c57
Compare
58663a0 to
e2058e1
Compare
ebcc557 to
b9d4ac1
Compare
kuczoram
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot Denys for this patch! Overall it looks good, the test cases also look good. The second testcase indeed can reproduce the issue with the two bases (if the assert is disabled).
I have one question about the SQL query modification.
...ver/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/queries/ReadyToCleanHandler.java
Show resolved
Hide resolved
b9d4ac1 to
f29a40b
Compare
f29a40b to
a7dc666
Compare
|



What changes were proposed in this pull request?
TxnUtils#createValidTxnListForCleanerfindReadyToCleaneligibility condition inReadyToCleanHandler(i.e. CQ_HIGHEST_WRITE_ID < MIN_OPEN_WRITE_ID - 1)
addWriteIdsToMinHistoryfrom AcidCompactionServicerevokeTimedoutWorkersWhy 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