-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29210: Minor compaction produces duplicates conditionally in cas… #6101
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
…e of HMS instance running initiator crash
| return 1; | ||
| } | ||
| } | ||
| else if (visibilityTxnId != parsedDelta.visibilityTxnId) { |
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.
else if (visibilityTxnId != parsedDelta.visibilityTxnId) {
return visibilityTxnId < parsedDelta.visibilityTxnId ? 1 : -1;
}
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.
Made this change in 8711dcd
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.
we shouldn't allow concurrent compaction with above properties
|
Hi @tanishq-chugh , |
…ction job concurrently
|
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 @tanishq-chugh! It looks good to me.
|
hi @tanishq-chugh, how could we get into the situation with concurrent minor compactions? If that is related to compaction running on HMS I already mentioned to you, that we should just drop the support (it's already deprecated) |
| && next.minWriteId == prev.minWriteId | ||
| && next.statementId == prev.statementId) { | ||
| && next.statementId == prev.statementId | ||
| && (next.isDeleteDelta || prev.isDeleteDelta)) { |
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.
why is this change needed?
|
Hi @deniskuzZ |
|
|
||
| // Overlapping compacted deltas with different visibilityTxnIDs simulating concurrent compaction from two workers | ||
| addDeltaFile(t, null, 22L, 23L, 2, 24); | ||
| addDeltaFile(t, null, 22L, 23L, 2, 25); |
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.
I don't think we should allow this to happen in first place
@tanishq-chugh HIVE-29210 mentions HMS local workers |
|
@deniskuzZ It mentions initiator in HMS but worker threads within HS2. |
|
@tanishq-chugh, revokeFromLocalWorkers was only needed when HMS had local workers. As we remove support it should be just dropped, instead of adding workarounds in a code |



…e of HMS instance running initiator crash
What changes were proposed in this pull request?
Compactor cleaner fix to address duplicate directories created from multiple jobs running same compaction
Why are the changes needed?
To address the race condition where multiple jobs running same compaction leads to duplicate data
Does this PR introduce any user-facing change?
No
How was this patch tested?
Manual Testing after reproducing the issue on a deployed cluster