raftstore: campaign newly created regions in time after Split (#17625)#17846
Merged
ti-chi-bot[bot] merged 1 commit intotikv:release-8.5from Nov 19, 2024
Merged
Conversation
…kv#17625) close tikv#12410 This pr make the `campaign` of the newly splitted regions triggered in time, when the leadership of the parent region is stable after `on_role_changed`. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
9 tasks
LykxSassinator
approved these changes
Nov 19, 2024
SpadeA-Tang
approved these changes
Nov 19, 2024
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LykxSassinator, SpadeA-Tang 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 |
Contributor
[LGTM Timeline notifier]Timeline:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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