Skip to content

raftstore: campaign newly created regions in time after Split (#17625)#17846

Merged
ti-chi-bot[bot] merged 1 commit intotikv:release-8.5from
ti-chi-bot:cherry-pick-17625-to-release-8.5
Nov 19, 2024
Merged

raftstore: campaign newly created regions in time after Split (#17625)#17846
ti-chi-bot[bot] merged 1 commit intotikv:release-8.5from
ti-chi-bot:cherry-pick-17625-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Member

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 CmdEpochChecker allows the BatchSplit or Split proposals even though the last TransferLeader is still on-going, making the newly created region cannot campaign leader immediately. The root cause of these issues is that TransferLeader does not be recorded into the proposal queue in CmdEpochChecker as it will not change the conf_ver, if the proposal queue has no conflicts admin commands.
And these issues will damage the stability of TiKV, returning 9005 errors to the Client who wanna access the relative data.

So, to tackle these issues, 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. And the newly added progress can be reviewed from the following diagram on step 6.
image

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`.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Release note

This pr introduces an supplementary rule, making `TransferLeader` mutually exclusive with other commands 
which will change the `conf_ver`, for checking the execution validity.

…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>
@ti-chi-bot ti-chi-bot added dco-signoff: yes Indicates the PR's author has signed the dco. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Nov 19, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 19, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 19, 2024

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [LykxSassinator,SpadeA-Tang]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 19, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-19 10:28:31.475012042 +0000 UTC m=+956873.665881042: ☑️ agreed by LykxSassinator.
  • 2024-11-19 10:41:21.483875584 +0000 UTC m=+957643.674744573: ☑️ agreed by SpadeA-Tang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants