Evict-leader should stop leader transfer into stores with 'reject-leader' label while not
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
- 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
I don't reproduce this issue in my local environment with the following steps:
- start a cluster with 4 tikv using tiup
- change the store 6 label by using pd-ctl
store label 6 zone=z1 - execute
config set label-property reject-leader zone z1 - execute
scheduler add evict-leader-scheduler 1
The leader in store 6 has not changed.
I have double-checked but I cannot reproduce it in both v5.4.0 and master. Close it for now.