region_scatterer: fix the bug that could generate schedule with too few peers (#4570)#4577
Conversation
…ew peers close tikv#4565 Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: HunDunDM <hundundm@gmail.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 submitting an approval review. |
Codecov Report
@@ Coverage Diff @@
## release-5.3 #4577 +/- ##
===============================================
+ Coverage 74.87% 74.91% +0.03%
===============================================
Files 264 264
Lines 27281 27285 +4
===============================================
+ Hits 20427 20440 +13
+ Misses 5037 5034 -3
+ Partials 1817 1811 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: HunDunDM <hundundm@gmail.com>
|
/rebuild |
|
/merge |
|
@JmPotato: 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. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 6877ac7 |
This is an automated cherry-pick of #4570
What problem does this PR solve?
close #4565
What is changed and how it works?
If an originPeer is already in
selectStore,continuedirectly. Otherwise, it will end up picking atargetPeerwhich is either itself or some other store that is not in the initial peer list. Since entering the select phase, it is guaranteed that it is not in theselectStore, so it is always guaranteed that the worst-case selection itself is feasible at this time. In the end, the number of peers before and after can be guaranteed to remain unchanged.Check List
Tests
When not modified, the following operator may be generated:
scatter-region {rm peer: store [3]} (kind:region,leader, region:201(0,0), createAt:2022-01-13 18:24:32.375399 +0800 CST m=+0.014571751, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 3 to store 4, remove peer on store 3])
Code changes
Side effects
Related changes
Release note