[Optimize][Clone] Take version count into consideration when choosing src replica for clone task#6513
Merged
morningman merged 5 commits intoapache:masterfrom Aug 30, 2021
Conversation
morningman
reviewed
Aug 26, 2021
fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
Outdated
Show resolved
Hide resolved
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
caiconghui
reviewed
Aug 30, 2021
caiconghui
reviewed
Aug 30, 2021
3 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.
Proposed changes
Fix #6512
If there is missing replica for a tablet, clone task will be executed to restore missing replica from a healthy replica. Src replica selector will randomly choose a healthy replica as src replica.
It's better to choose the health replica with minmun version count as src replica so that it could avoid repetitive compaction task. In addition, replica with less version count is good for query performance.
Types of changes
What types of changes does your code introduce to Doris?
Put an
xin the boxes that apply