-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fit: optimize the selection of witness rule candidates #5904
Conversation
ref tikv#5568 Signed-off-by: Wenbo Zhang <[email protected]>
[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. Reviewer can indicate their review by submitting an approval review. |
/test build |
1 similar comment
/test build |
ref tikv#5568 Signed-off-by: Wenbo Zhang <[email protected]>
Random might cause some test cases to fail, I'll think again (: |
ref tikv#5568 Signed-off-by: Wenbo Zhang <[email protected]>
Codecov ReportBase: 75.46% // Head: 75.49% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5904 +/- ##
==========================================
+ Coverage 75.46% 75.49% +0.02%
==========================================
Files 345 345
Lines 35132 35126 -6
==========================================
+ Hits 26514 26517 +3
+ Misses 6322 6319 -3
+ Partials 2296 2290 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Wenbo Zhang <[email protected]>
/merge |
@bufferflies: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests 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. |
This pull request has been accepted and is ready to merge. Commit hash: 73d253a
|
@ethercflow: Your PR was out of date, I have automatically updated it for you. If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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. |
ref #5568
Signed-off-by: Wenbo Zhang [email protected]
What problem does this PR solve?
Issue Number: ref #5568
What is changed and how does it work?
IsWitness
of theRule
istrue
, the leader will be removed from the candidate list, so that when the best rule is selected, it is impossible for the leader to exist in the witness rule;storestate
, then 50% of them will be randomly sorted to prevent the sorted peer list from being fixed, so that when the best rule is selected, the fixed peer will always be returned, causing some store balance, a store is 0;before:
After:
Update:
If the rule remains unchanged, each time the rule_checker checks the region, it will directly fetch the previously calculated best rule from the cache without being randomly affected. But If the rule is manually modified, the cache will become invalid, and the rule_checker will recalculate each region, which may cause unnecessary scheduling for existing peers, such as adding TiFlash. So remove the random strategy.
Check List
Tests
Code changes
Side effects
Related changes
Release note