tikv / pd

Placement driver for TiKV
Apache License 2.0
1.03k stars 714 forks source link

etcdutil: check if the endpoint has been removed before evicting #8287

Closed JmPotato closed 2 weeks ago

JmPotato commented 2 weeks ago

What problem does this PR solve?

Issue Number: close #8286.

What is changed and how does it work?

Once a member is removed from the cluster, its endpoint should no longer exist in the health checker.
This PR adds a check to prevent the removed endpoint from being evicted again unexpectedly.

Check List

Tests

Release note

None.
codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.36%. Comparing base (13174b5) to head (cd92a5b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8287 +/- ## ========================================== + Coverage 77.25% 77.36% +0.11% ========================================== Files 470 470 Lines 61385 61387 +2 ========================================== + Hits 47423 47494 +71 + Misses 10401 10331 -70 - Partials 3561 3562 +1 ``` | [Flag](https://app.codecov.io/gh/tikv/pd/pull/8287/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tikv) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/tikv/pd/pull/8287/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tikv) | `77.36% <100.00%> (+0.11%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tikv#carryforward-flags-in-the-pull-request-comment) to find out more.
ti-chi-bot[bot] commented 2 weeks ago

@okJiang: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to [this](https://github.com/tikv/pd/pull/8287#pullrequestreview-2117765961): > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ti-chi-bot[bot] commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, nolouch, okJiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tikv/pd/blob/master/OWNERS)~~ [HuSharp,nolouch] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 2 weeks ago

[LGTM Timeline notifier]

Timeline:

HuSharp commented 2 weeks ago

/run-cherry-picker

ti-chi-bot commented 2 weeks ago

In response to a cherrypick label: new pull request created to branch release-8.1: #8290.

ti-chi-bot commented 2 weeks ago

In response to a cherrypick label: new pull request created to branch release-7.5: #8291.