raftstore: campaign newly created regions in time after Split (#17625)#18148
Conversation
close tikv#12410 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
@hbisheng: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
|
/check-pick-approved |
|
/check-label |
|
/check-issue-triage-complete |
|
@hbisheng: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hbisheng, LykxSassinator, overvenus The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
This is an automated cherry-pick of #17625
What is changed and how it works?
Issue Number: Close #12410 and #17602.
What's Changed:
As issues #12410 and #17602 shows, the original design of
CmdEpochCheckerallows theBatchSplitorSplitproposals even though the lastTransferLeaderis still on-going, making the newly created region cannotcampaignleader immediately. The root cause of these issues is thatTransferLeaderdoes not be recorded into the proposal queue inCmdEpochCheckeras it will not change theconf_ver, if the proposal queue has no conflicts admin commands.And these issues will damage the stability of TiKV, returning
9005errors to the Client who wanna access the relative data.So, to tackle these issues, this pr make the

campaignof the newly splitted regions triggered in time, when the leadership of the parent region is stable afteron_role_changed. And the newly added progress can be reviewed from the following diagram onstep 6.Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Side effects
Release note