[MINOR] improve comaction operator shuffle#11757
Merged
danny0405 merged 1 commit intoapache:masterfrom Aug 14, 2024
Merged
Conversation
xicm
commented
Aug 12, 2024
| // make the distribution strategy deterministic to avoid concurrent modifications | ||
| // on the same bucket files | ||
| .keyBy(plan -> plan.getOperation().getFileGroupId().getFileId()) | ||
| .rebalance() |
Contributor
Author
There was a problem hiding this comment.
One operator one file group, rebalance is ok.
This is what we do in HoodieFlinkCompactor
Contributor
There was a problem hiding this comment.
Is rebanlance deterministic for multiple concurrent tasks, when there are task failover and retries, two task may has the risk of sharing a common compaction file group.
Contributor
There was a problem hiding this comment.
Did you test it offline already?
Contributor
Author
There was a problem hiding this comment.
I tested on my cluster. But I didn't test the failed and retry case.
Contributor
Author
There was a problem hiding this comment.
Offline conpaction uses rebalance.
ec36c19 to
039fbc7
Compare
danny0405
approved these changes
Aug 14, 2024
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Logs
I found a skew in the flink compaction task.
Compaction task shuffle the compaction operation with keyby, A series of hash mods results in skew.
One file group on compaction operator, so we don't need keyby, just rebalance is OK.
This is the result of rebanlace.
Impact
none
Risk level (write none, low medium or high below)
none
Documentation Update
none
Contributor's checklist