Skip to content
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

Evict-leader should stop leader transfer into stores with 'reject-leader' label while not #5853

Open
AndreMouche opened this issue Jan 11, 2023 · 1 comment

Comments

@AndreMouche
Copy link
Member

Bug Report

it seems the command of evict-leader does not stop other leaders transfer into it.

What did you do?

30 tikv/3pd/3tidb

  1. pd-ctl config set label-property reject-leader zone XXX

And in PD's log

[2023/01/10 10:56:35.910 +08:00] [INFO] [server.go:997] ["label property config is updated"] [config="{"reject-leader":[{"key":"zone","value":"xxx"}]}"]

It shows that evict-leader was set successfully, while I can still find that pd try to transfer leader from other store to the stores with regect-leader label:
here store 15,store 16 shares the zone xxx

[2023/01/10 10:58:30.244 +08:00] [INFO] [operator_controller.go:635] ["send schedule command"] [region-id=235] [step="transfer leader from store 13 to store 15"] [source=create]

[2023/01/10 12:59:32.245 +08:00] [INFO] [operator_controller.go:635] ["send schedule command"] [region-id=723] [step="transfer leader from store 17 to store 16"] [source=create]

What did you expect to see?

no leader should transfer into the store with reject-leader label.

What did you see instead?

PD try to transfer leader into the store with reject-leader label

What version of PD are you using (pd-server -V)?

v5.4.0

@AndreMouche AndreMouche added the type/bug The issue is confirmed as a bug. label Jan 11, 2023
@AndreMouche AndreMouche changed the title Evict-leader should stop leader transfer into it while not Evict-leader should stop leader transfer into stores with 'reject-leader' label while not Jan 11, 2023
@rleungx
Copy link
Member

rleungx commented Sep 2, 2024

I don't reproduce this issue in my local environment with the following steps:

  1. start a cluster with 4 tikv using tiup
  2. change the store 6 label by using pd-ctl store label 6 zone=z1
  3. execute config set label-property reject-leader zone z1
  4. execute scheduler add evict-leader-scheduler 1

The leader in store 6 has not changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants