Skip to content

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

Merged
ti-chi-bot[bot] merged 2 commits intotikv:release-6.5from
ti-chi-bot:cherry-pick-17625-to-release-6.5
Jan 26, 2025
Merged

raftstore: campaign newly created regions in time after Split (#17625)#18148
ti-chi-bot[bot] merged 2 commits intotikv:release-6.5from
ti-chi-bot:cherry-pick-17625-to-release-6.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.

close tikv#12410

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@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-6.5 This PR is cherry-picked to release-6.5 from a source PR. labels Jan 21, 2025
@ti-chi-bot ti-chi-bot bot added do-not-merge/cherry-pick-not-approved size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 21, 2025
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 24, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 24, 2025

@hbisheng: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In 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>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 24, 2025
@LykxSassinator
Copy link
Contributor

/check-pick-approved

@LykxSassinator
Copy link
Contributor

/check-label

@LykxSassinator
Copy link
Contributor

/check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Jan 24, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 26, 2025

@hbisheng: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

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

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 26, 2025

[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

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

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 Jan 26, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 26, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-24 08:54:37.465085729 +0000 UTC m=+430204.796005133: ☑️ agreed by LykxSassinator.
  • 2025-01-26 04:59:25.263299527 +0000 UTC m=+588892.594218931: ☑️ agreed by overvenus.

@ti-chi-bot ti-chi-bot bot merged commit 5f6e6c8 into tikv:release-6.5 Jan 26, 2025
4 checks passed
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-6.5 This PR is cherry-picked to release-6.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants