pd
pd copied to clipboard
Allow evicting leader scheduling when lightning importing
Enhancement Task
Previously, lightning used the global pause policy to avoid scheduling when importing data, which allowed evicting the leader in the process. After https://github.com/tikv/pd/pull/4649, we support pausing scheduling a specified key range through a label rule. But it will pause all scheduling including the evict leader. Recently, we encountered an issue: https://github.com/pingcap/tidb/issues/51143. The import process will block the pod from being rescheduled to another node. In this case, pausing evicting the leader is not suitable. At least, we need to make it compatible with the previous behavior.