Skip to content

cherry-pick : server: graceful shutdown tikv-impl (#18930)#19016

Merged
ti-chi-bot[bot] merged 2 commits intotikv:release-8.5-20250122-v8.5.0from
hujiatao0:release-8.5-20250122-v8.5.0
Sep 30, 2025
Merged

cherry-pick : server: graceful shutdown tikv-impl (#18930)#19016
ti-chi-bot[bot] merged 2 commits intotikv:release-8.5-20250122-v8.5.0from
hujiatao0:release-8.5-20250122-v8.5.0

Conversation

@hujiatao0
Copy link
Contributor

@hujiatao0 hujiatao0 commented Sep 28, 2025

close #17221

When a SIGTERM signal is received, TiKV tells PD it's stopping by StoreHeartbeat. PD then try to move all the leaders from that TiKV instance before it fully shuts down.

What is changed and how it works?

Issue Number: Close #17221

What's Changed:

When a SIGTERM signal is received, TiKV tells PD it's stopping by StoreHeartbeat. PD then try to move all the leaders from that TiKV instance before it fully shuts down.

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

Support graceful shutdown for TiKV upon receiving a SIGTERM signal.

close tikv#17221

When a SIGTERM signal is received, TiKV tells PD it's stopping by StoreHeartbeat. PD then try to move all the leaders from that TiKV instance before it fully shuts down.

Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. contribution This PR is from a community contributor. labels Sep 28, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 28, 2025

Hi @hujiatao0. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 ti-chi-bot bot added needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 28, 2025
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 29, 2025
@hbisheng
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Sep 29, 2025
Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 29, 2025
@hujiatao0
Copy link
Contributor Author

cc @overvenus please review this PR

@hbisheng hbisheng requested a review from overvenus September 29, 2025 09:16
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 29, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 29, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-09-29 02:22:38.69038421 +0000 UTC m=+51338.947115600: ☑️ agreed by hbisheng.
  • 2025-09-29 09:35:23.344260017 +0000 UTC m=+77303.600991407: ☑️ agreed by overvenus.

@hujiatao0
Copy link
Contributor Author

cc @zhangjinpeng87

Copy link
Member

@v01dstar v01dstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the target branch correct?

@hujiatao0
Copy link
Contributor Author

Is the target branch correct?

Yes, The branch is cited by https://tirelease.pingcap.net/home/hotfix/20250926-8.5.0-GTOC-7728

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, hbisheng, 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:

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 the approved label Sep 30, 2025
@ti-chi-bot ti-chi-bot bot merged commit 3c52ecf into tikv:release-8.5-20250122-v8.5.0 Sep 30, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved contribution This PR is from a community contributor. dco-signoff: yes Indicates the PR's author has signed the dco. lgtm ok-to-test Indicates a PR is ready to be tested. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants