etcd(ticdc): update etcd cluster member correctly#12646
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the update method in pkg/etcd/client.go to synchronize the internal client cache with a provided list of endpoints, ensuring that stale clients are removed. The review feedback identifies a potential resource leak where clients are deleted without being closed and suggests a performance optimization by pre-allocating the map capacity.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: asddongmen, lidezhu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
/retest |
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #12368
What is changed and how it works?
When updating etcd client URLs, remove the client that is not a member of the etcd cluster.
Check List
Tests
Print only once
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note