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 supports multi targets #4229

Closed
MrCroxx opened this issue Oct 21, 2021 · 1 comment · Fixed by #4401
Closed

Evict leader supports multi targets #4229

MrCroxx opened this issue Oct 21, 2021 · 1 comment · Fixed by #4401
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@MrCroxx
Copy link
Member

MrCroxx commented Oct 21, 2021

Subtask of tikv#10602.

Briefly, we can make PD give TiKV all valid peers when evicting leader, and let TikV to decide which one to transfer leader to. To compat with old TiKV version, we can simply introduce a new repeated field in the origin TransferLeader message, and fill in both fields.

@MrCroxx MrCroxx added the type/enhancement The issue or PR belongs to an enhancement. label Oct 21, 2021
MrCroxx added a commit to MrCroxx/pd that referenced this issue Oct 21, 2021
close [tikv#4229](tikv#4229).

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
MrCroxx added a commit to MrCroxx/pd that referenced this issue Nov 1, 2021
close [tikv#4229](tikv#4229).

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
MrCroxx added a commit to MrCroxx/pd that referenced this issue Nov 9, 2021
close tikv#4229

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
MrCroxx added a commit to MrCroxx/pd that referenced this issue Nov 29, 2021
Add a new field `Peers` in `TransferLeader` to support
multi-target evict leader. During building steps,
`targetLeaderStoreIDs` is only used by multi-target
evict leader, so the field will not be filtered by
joint/not-joint rules.

Close tikv#4229 .

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@rleungx
Copy link
Member

rleungx commented Dec 15, 2021

Related to #1649.

ti-chi-bot pushed a commit that referenced this issue Jan 10, 2022
* upgrate pingcap/check dep

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

* add multi-target support in TransferLeader

Add a new field `Peers` in `TransferLeader` to support
multi-target evict leader. During building steps,
`targetLeaderStoreIDs` is only used by multi-target
evict leader, so the field will not be filtered by
joint/not-joint rules.

Close #4229 .

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

* add multi target transfer leader test

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

* fix SetLeaders validation

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

* fix bugs

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

* fix build

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

* refactor code

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

* fix build

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
2 participants