-
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
etcdutil: remove client when etcd server is unhealthy #7729
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. |
dcde812
to
61d2b4d
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7729 +/- ##
==========================================
+ Coverage 73.79% 73.80% +0.01%
==========================================
Files 429 429
Lines 47568 47595 +27
==========================================
+ Hits 35101 35126 +25
+ Misses 9479 9478 -1
- Partials 2988 2991 +3
Flags with carried forward coverage won't be shown. Click here to find out more. |
ecab0a8
to
a383beb
Compare
Signed-off-by: husharp <jinhao.hu@pingcap.com>
a383beb
to
5f36de6
Compare
/hold |
@@ -1684,6 +1689,12 @@ func (s *Server) campaignLeader() { | |||
log.Info(fmt.Sprintf("campaign %s leader meets error due to txn conflict, another PD/API server may campaign successfully", s.mode), | |||
zap.String("campaign-leader-name", s.Name())) | |||
} else { | |||
// for frequently changed etcd leader, we should set client status to unhealthy | |||
if strings.Contains(err.Error(), "frequently changed") { |
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.
only this one kind of error?
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.
will being checked by trend
if status, ok := checker.isUnHealthy.Load(ep); ok && status.(bool) { | ||
log.Info("some etcd server is unhealthy", zap.String("endpoint", ep)) | ||
// set unhealthy etcd client to healthy | ||
checker.isUnHealthy.Delete(ep) |
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.
If we remove isUnHealthy
here, will we receive "frequently changed" error again?
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.
trend check will make sure this node not participate in campaigning leader
Since we need to get the state of all the pd's and then temporarily remove them in current PD own Close this pr now. |
What problem does this PR solve?
Issue Number: Ref #7730
What is changed and how does it work?
Question summary:
PR Summary:
frequently error
, will remove client endpointsTODO
using trend to update ref #7682
Check List
Tests
Release note