*: use another etcd client for election#6409
Conversation
|
[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. DetailsReviewer can indicate their review by submitting an approval review. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #6409 +/- ##
==========================================
+ Coverage 75.03% 75.07% +0.03%
==========================================
Files 409 408 -1
Lines 41532 41113 -419
==========================================
- Hits 31165 30867 -298
+ Misses 7659 7560 -99
+ Partials 2708 2686 -22
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
pkg/utils/etcdutil/etcdutil.go
Outdated
There was a problem hiding this comment.
return two etcdClient? maybe we can directly create electionClient with another function?
There was a problem hiding this comment.
+1. The change in pr isn't clean
There was a problem hiding this comment.
Just call "electionClient, err := createEtcdClient(tlsConfig, acUrls)" to create a dedicate election etcd client is clearer.
There was a problem hiding this comment.
Hmmm... I'm trying to avoid duplicated config initialization.
There was a problem hiding this comment.
just to add a createEtcdClient in server.go?
There was a problem hiding this comment.
+1, we can create two clients in startClient not here.
server/server.go
Outdated
There was a problem hiding this comment.
why not use array? Maybe putting them into on struct is better?
pkg/utils/etcdutil/etcdutil.go
Outdated
There was a problem hiding this comment.
+1. The change in pr isn't clean
pkg/utils/etcdutil/etcdutil.go
Outdated
There was a problem hiding this comment.
Just call "electionClient, err := createEtcdClient(tlsConfig, acUrls)" to create a dedicate election etcd client is clearer.
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
|
/merge |
|
@nolouch: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests DetailsInstructions 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. DetailsCommit hash: 343bda6 |
|
In response to a cherrypick label: new pull request created to branch |
ref tikv#6403 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
In response to a cherrypick label: new pull request created to branch |
ref tikv#6403 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
What problem does this PR solve?
Issue Number: Ref #6403.
What is changed and how does it work?
This PR tries to use another etcd client for the election to prevent the throttling of one connection.
Check List
Tests
Release note