-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
store/tikv: always switch to a different peer when meets no-leader #22449
Conversation
328d0bb
to
5abe88a
Compare
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
/run-all-tests |
1 similar comment
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Maybe we need to add more integrated failover tests as joint-consensus is enabled default to ensure there is no availability issues. |
LGTM |
/run-all-tests |
@youjiali1995 merge failed. |
/run-all-tests |
/run-integration-ddl-test |
/merge |
/run-all-tests |
@youjiali1995 merge failed. |
b9219a6
to
1f61293
Compare
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
@MyonKeminta: Please use If you have approved this PR, please ignore this reply. This reply is being used as a temporary reply during the migration of the new bot and will be removed on April 1. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 6a9946e
|
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 44e8a12
|
/run-check_dev_2 |
/run-check_dev_2 |
/run-unit-test |
/run-check_dev_2 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.0 in PR #23595 |
Signed-off-by: youjiali1995 zlwgx1023@gmail.com
What problem does this PR solve?
Issue Number: close #22400
Problem Summary:
Joint consensus is enabled in master, which is possible to make a leader step down as a learner during a conf change. And hibernate region is also enabled by default in master, so after the leader step down, there can be a long time that there is no leader in the region until requests are sent to followers or hibernate timeout. But from logs, I can see TiDB keeps querying the learner instead of trying other followers, hence it keeps timeout until hibernate is woken up.
What is changed and how it works?
What's Changed:
One solution is always to try a different peer when meets no-leader. There is a small probability that the current peer who reports not-leader becomes a leader and TiDB has to retry once in this case.
Related changes
Check List
Tests
Release note