region_scatterer: fix the bug that could generate schedule with too few peers#4570
region_scatterer: fix the bug that could generate schedule with too few peers#4570ti-chi-bot merged 6 commits intotikv:masterfrom
Conversation
|
[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 @@
## master #4570 +/- ##
==========================================
+ Coverage 74.83% 74.89% +0.06%
==========================================
Files 265 265
Lines 27904 27908 +4
==========================================
+ Hits 20883 20903 +20
+ Misses 5154 5137 -17
- Partials 1867 1868 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…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>
|
/merge |
|
@nolouch: 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: eed68c7 |
…ew peers (tikv#4570) Signed-off-by: HunDunDM <hundundm@gmail.com> Signed-off-by: nolouch <nolouch@gmail.com>
…ew peers (#4570) (#4579) * region_scatterer: fix the bug that could generate schedule with too few peers (#4570) close #4565 Signed-off-by: HunDunDM <hundundm@gmail.com> * region_scatterer: fix incorrect test (#4586) Signed-off-by: HunDunDM <hundundm@gmail.com> Co-authored-by: HunDunDM <hundundm@gmail.com>
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