tikv / pd

Placement driver for TiKV
Apache License 2.0
1.06k stars 724 forks source link

scheduler: use right check for evict/grant leader scheduler (#8758) #8778

Closed ti-chi-bot closed 3 weeks ago

ti-chi-bot commented 3 weeks ago

This is an automated cherry-pick of #8758

What problem does this PR solve?

Issue Number: Ref https://github.com/tikv/pd/issues/8756

What is changed and how does it work?

Check List

Tests

If I run the ut in release-7.1 branch, it will report error

--- FAIL: TestEvictLeaderScheduler (3.42s)
    /Users/jiangxianjie/Code/okjiang/pd/tests/pdctl/scheduler/scheduler_test.go:638: 
            Error Trace:    /Users/jiangxianjie/Code/okjiang/pd/tests/pdctl/scheduler/scheduler_test.go:638
            Error:          "Failed! [400] \"[PD:scheduler:ErrSchedulerConfig]wrong scheduler config id\"\n\n" does not contain "Success!"
            Test:           TestEvictLeaderScheduler

Release note

Fix an issue that the grant/evict-leader-scheduler doesn't work when create them twice with the same store-id
ti-chi-bot[bot] commented 3 weeks ago

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

In response to [this](https://github.com/tikv/pd/pull/8778#pullrequestreview-2417599764): > 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 3 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato, okJiang, rleungx

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/release-6.5/OWNERS)~~ [JmPotato,rleungx] 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 3 weeks ago

[LGTM Timeline notifier]

Timeline: