-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
tikv: fix notLeader
in region cache
#10572
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10572 +/- ##
===============================================
+ Coverage 77.3594% 77.3655% +0.006%
===============================================
Files 413 413
Lines 87498 87442 -56
===============================================
- Hits 67688 67650 -38
+ Misses 14605 14598 -7
+ Partials 5205 5194 -11 |
/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.
Can we use failpoint to stimulate this case?
/run-all-tests |
/rebuild |
/run-unit-test |
|
/run-all-tests |
PTAL @coocood |
/run-all-tests |
/run-integration-ddl-test |
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
LGTM |
What problem does this PR solve?
fixes bug introduced by #10256
the question is NotLeader response told A1 is leader, but A1 maybe meet other error(e.g. network error) and be marked as
failed
, when next request arrival, TiDB will try round-robin try other nodes, so request will send to A2, and A2 told NotLeader(A1 is leader) again.What is changed and how it works?
when recieve NotLeader, not only switch currentPeer to A1 but also clear up A1's failed marker.
then next request will try A1, until Ax return a NotLeader with NULL is leader.
Check List
Tests
manual running tpcc/sysbench with write leader change test..
schrodinger boxdetail?boxid=15585290796895
Code changes
Side effects
Related changes
This change is