Skip to content

Backup: remove improper memory usage during full backup (#58591)#59500

Merged
ti-chi-bot[bot] merged 1 commit intopingcap:release-8.5from
ti-chi-bot:cherry-pick-58591-to-release-8.5
Jul 10, 2025
Merged

Backup: remove improper memory usage during full backup (#58591)#59500
ti-chi-bot[bot] merged 1 commit intopingcap:release-8.5from
ti-chi-bot:cherry-pick-58591-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Copy Markdown
Member

This is an automated cherry-pick of #58591

What problem does this PR solve?

Issue Number: close #58587
Problem Summary:
When performing a full backup on millions of tables, the default incomplete range buffer grows significantly due to the large number of ranges. Since most ranges are complete, a lower buffer value should be used to optimize memory usage.

What changed and how does it work?

Set default incomplete to a lower value.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    Manually Backup millions of tables
    Before this PR, the inuse memory consume 4GB with GetIncompleteRanges
    image

After the memory usage reduced.
image

  • 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

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 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 Feb 13, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-8.5@84f6a9a). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #59500   +/-   ##
================================================
  Coverage               ?   58.9105%           
================================================
  Files                  ?       1777           
  Lines                  ?     654048           
  Branches               ?          0           
================================================
  Hits                   ?     385303           
  Misses                 ?     244095           
  Partials               ?      24650           
Flag Coverage Δ
integration 40.7980% <100.0000%> (?)
unit 72.7816% <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 64.2134% <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 ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 13, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Feb 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, Leavrth

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 Feb 13, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Feb 13, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-13 08:57:34.617936281 +0000 UTC m=+519697.014158343: ☑️ agreed by Leavrth.
  • 2025-02-13 09:58:57.431769655 +0000 UTC m=+523379.827991719: ☑️ agreed by 3pointer.

@3pointer
Copy link
Copy Markdown
Contributor

/test unit-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Feb 13, 2025

@3pointer: No presubmit jobs available for pingcap/[email protected]

Details

In response to this:

/test unit-test

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 cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Jul 2, 2025
@BornChanger
Copy link
Copy Markdown
Contributor

/retest

@3pointer
Copy link
Copy Markdown
Contributor

3pointer commented Jul 9, 2025

/test unit-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 9, 2025

@3pointer: No presubmit jobs available for pingcap/[email protected]

Details

In response to this:

/test unit-test

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.

@BornChanger
Copy link
Copy Markdown
Contributor

/retest

@3pointer
Copy link
Copy Markdown
Contributor

/test unit-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 10, 2025

@3pointer: No presubmit jobs available for pingcap/[email protected]

Details

In response to this:

/test unit-test

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.

@3pointer
Copy link
Copy Markdown
Contributor

/test unit-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 10, 2025

@3pointer: No presubmit jobs available for pingcap/[email protected]

Details

In response to this:

/test unit-test

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.

@3pointer
Copy link
Copy Markdown
Contributor

/test unit-test

//pkg/session:session_test not stable

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 10, 2025

@3pointer: No presubmit jobs available for pingcap/[email protected]

Details

In response to this:

/test unit-test

//pkg/session:session_test not stable

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.

@3pointer
Copy link
Copy Markdown
Contributor

/retest

1 similar comment
@3pointer
Copy link
Copy Markdown
Contributor

/retest

@ti-chi-bot ti-chi-bot Bot merged commit e63ec41 into pingcap:release-8.5 Jul 10, 2025
14 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. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 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