Skip to content

raftstore: reset region approximate size/keys stats when it becomes leader (#19181)#19185

Merged
ti-chi-bot[bot] merged 3 commits intotikv:release-8.5from
ti-chi-bot:cherry-pick-19181-to-release-8.5
Dec 10, 2025
Merged

raftstore: reset region approximate size/keys stats when it becomes leader (#19181)#19185
ti-chi-bot[bot] merged 3 commits intotikv:release-8.5from
ti-chi-bot:cherry-pick-19181-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #19181

What is changed and how it works?

Issue Number: Close #19180

What's Changed:

Reset region's approximate size/keys stats when peer becomes leader. This can avoid peer report outdated stats to pd and caused unnecessary balance scheduling.

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

Fix the bug that pd heartbeat may report wrong region size/keys statistics data after leader change.

glorv added 3 commits December 8, 2025 13:09
Signed-off-by: glorv <glorvs@163.com>
Signed-off-by: glorv <glorvs@163.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/M Denotes a PR that changes 30-99 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 Dec 8, 2025
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Dec 9, 2025
@glorv glorv requested a review from hbisheng December 9, 2025 02:35
@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 Dec 9, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Dec 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, hbisheng

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 10, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Dec 10, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-12-09 02:35:12.913666006 +0000 UTC m=+922057.727443588: ☑️ agreed by glorv.
  • 2025-12-10 02:01:48.215237422 +0000 UTC m=+1006453.029014994: ☑️ agreed by hbisheng.

@glorv
Copy link
Contributor

glorv commented Dec 10, 2025

/retest

@ti-chi-bot ti-chi-bot bot merged commit bf8b47e into tikv:release-8.5 Dec 10, 2025
5 checks passed
@ti-chi-bot ti-chi-bot bot deleted the cherry-pick-19181-to-release-8.5 branch December 10, 2025 05:49
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/M Denotes a PR that changes 30-99 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