-
Notifications
You must be signed in to change notification settings - Fork 720
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
client: support add ready for resp and add backoff mechanism #6974
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. 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. |
Skipping CI for Draft Pull Request. |
afbdbad
to
72419ac
Compare
72419ac
to
0b61f79
Compare
0b61f79
to
eb18105
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #6974 +/- ##
==========================================
- Coverage 74.25% 74.23% -0.02%
==========================================
Files 433 435 +2
Lines 45904 46010 +106
==========================================
+ Hits 34085 34157 +72
- Misses 8810 8842 +32
- Partials 3009 3011 +2
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: husharp <[email protected]>
eb18105
to
120a937
Compare
Signed-off-by: husharp <[email protected]>
Signed-off-by: husharp <[email protected]>
e092082
to
36e8caf
Compare
What problem does this PR solve?
Issue Number: ref #6556
What is changed and how does it work?
PR Summary
reconnectMemberLoop
callupdateMember
periodically. When callingScheduleCheckMemberChanged
channel, we need to wait for the goroutine to update members until ready or timeout.expo
function can be used to backoff to sleep when an error is encountered.Reproduce Step
enable fail point, like gRPC is throttling, cannot read from etcd.
curl -X PUT -d 'return(10)' http://tc-pd-1.tc-pd-peer.csn-simulator-big-cluster-vd62g.svc:2379/pd/api/v1/fail/github.com/tikv/pd/pkg/etcdutil/SlowEtcdKVGet
simulate pd lost leader
curl -X PUT -d 'return("2346857576170797299")' http://tc-pd-1.tc-pd-peer.csn-simulator-big-cluster-vd62g.svc:2379/pd/api/v1/fail/github.com/tikv/pd/server/exitCampaignLeader
Reproduce Result
Grpc request
GetMember
keeps high:TiKV side show
PR Effect
The Grpc
GetMember
call was reduced from 778 to 216, which is relative to the TiDB numbers and client requests for triaging checkLeader.And more tests are necessary to ensure that no further issues arise.
Check List
Tests
Release note