Skip to content

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #62887

What problem does this PR solve?

Issue Number: close #62590

Problem Summary:

based on issue reproduction and memory analysis , the majority of memory waste comes from creating pseudo stats table when doing needDumpStatsDelta check, we can simply use a lightweight approach to solve it without changing too much of the code.

This is happening during millions table workload while dumping stats happens frequently, in the issue mentioned smaller table size should also have same effect but I was unable to reproduce, maybe query creates only limited number of pseudo stats and quickly got GC, whereas dump stats happened for all tables in a burst, causing memory pressure.

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

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

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: Wenqi Mou <[email protected]>
Signed-off-by: Wenqi Mou <[email protected]>
@ti-chi-bot ti-chi-bot added ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner 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 Nov 19, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 19, 2025

This cherry pick PR is for a release branch and has not yet been approved by triage owners.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick:

  1. It must be approved by the approvers firstly.
  2. AFTER it has been approved by approvers, please wait for the cherry-pick merging approval from triage owners.

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.

Copy link
Member

@0xPoe 0xPoe left a comment

Choose a reason for hiding this comment

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

Thanks! :shipit:

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 19, 2025
@0xPoe
Copy link
Member

0xPoe commented Nov 19, 2025

This would help reduce this CPU burn:
image

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-8.5@69b1dbe). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #64565   +/-   ##
================================================
  Coverage               ?   76.4701%           
================================================
  Files                  ?       1654           
  Lines                  ?     456109           
  Branches               ?          0           
================================================
  Hits                   ?     348787           
  Misses                 ?      86214           
  Partials               ?      21108           
Flag Coverage Δ
integration 48.9974% <100.0000%> (?)
unit 72.7296% <100.0000%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9278% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 52.6842% <0.0000%> (?)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xPoe, time-and-fate

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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 Nov 19, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 19, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-11-19 10:02:41.259986749 +0000 UTC m=+92324.909181196: ☑️ agreed by 0xPoe.
  • 2025-11-19 10:33:36.615204997 +0000 UTC m=+94180.264399444: ☑️ agreed by time-and-fate.

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

Labels

approved do-not-merge/cherry-pick-not-approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner 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.

4 participants