schedule: revise region_scatter distribution for multi groups (#3422)#3620
schedule: revise region_scatter distribution for multi groups (#3422)#3620Yisaer merged 5 commits intotikv:release-4.0from
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
@Yisaer you're already a collaborator in bot's repo. |
|
plz fix the conflict |
|
/merge |
|
@zhouqiang-cl: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
@zhouqiang-cl: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Signed-off-by: yisaer <disxiaofei@163.com>
Signed-off-by: yisaer <disxiaofei@163.com>
Signed-off-by: yisaer <disxiaofei@163.com>
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by writing |
|
SonarCloud Quality Gate failed.
|
Codecov Report
@@ Coverage Diff @@
## release-4.0 #3620 +/- ##
===============================================
- Coverage 74.60% 74.56% -0.04%
===============================================
Files 211 211
Lines 19908 19933 +25
===============================================
+ Hits 14852 14863 +11
- Misses 3715 3728 +13
- Partials 1341 1342 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
cherry-pick #3422 to release-4.0
You can switch your code base to this Pull Request by using git-extras:
# In pd repo: git pr https://github.com/tikv/pd/pull/3620After apply modifications, you can push your change to this PR via:
Signed-off-by: Song Gao disxiaofei@163.com
What problem does this PR solve?
ref pingcap/tidb#22788
Currently region-scatter didn't work well for multi regions in different groups.
For example, there are 50 regions and 6 stores in the cluster. Each region belong to a dedicated group.
region scatter may locate them in the
store1/store2/store3. Thus from each region in the group, the distribution is well. And for the whole cluster, the distribution is not well.What is changed and how it works?
During region scatter, we should consider whether the target store already have the most peer or leader, if it is, we should skip it.
Check List
Tests
I also tested with the testcases in this document: https://docs.google.com/document/d/1cGZU2DCm0UuIueqAQP8TGqTivyavCvB_QiwIzqvP_rA/edit
All the test case results didn't change.
Release note