Skip to content

balance: lower the OOM risk level during TiDB bootstrap (#1167)#1169

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:release-nextgen-202603from
ti-chi-bot:cherry-pick-1167-to-release-nextgen-202603
Jun 5, 2026
Merged

balance: lower the OOM risk level during TiDB bootstrap (#1167)#1169
ti-chi-bot[bot] merged 1 commit into
pingcap:release-nextgen-202603from
ti-chi-bot:cherry-pick-1167-to-release-nextgen-202603

Conversation

@ti-chi-bot
Copy link
Copy Markdown
Member

This is an automated cherry-pick of #1167

What problem does this PR solve?

Issue Number: close #848

Problem Summary:
When TiDB starts, the memory usually increases sharply, leading to fake OOM risk. This will cause unnecessary session migrations.

What is changed and how it works:
Adjust the TimeToOOM to timeToOOM = time.Duration(float64(timeToOOM) / latestUsage * 0.6).

  • /latestUsage: the lower the current usage is, the longer the timeToOOM is
  • * 0.6: lower the timeToOOM so that the thresholds don't need to be changed

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

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

None

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jun 5, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: djshow832

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
Copy link
Copy Markdown

ti-chi-bot Bot commented Jun 5, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-06-05 12:20:06.675919957 +0000 UTC m=+530507.746237347: ☑️ agreed by djshow832.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-nextgen-202603@15487a6). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                    @@
##             release-nextgen-202603    #1169   +/-   ##
=========================================================
  Coverage                          ?   67.47%           
=========================================================
  Files                             ?      149           
  Lines                             ?    16171           
  Branches                          ?        0           
=========================================================
  Hits                              ?    10911           
  Misses                            ?     4522           
  Partials                          ?      738           
Flag Coverage Δ
unit 67.47% <100.00%> (?)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ti-chi-bot ti-chi-bot Bot merged commit 20ece63 into pingcap:release-nextgen-202603 Jun 5, 2026
6 checks passed
@djshow832 djshow832 deleted the cherry-pick-1167-to-release-nextgen-202603 branch June 5, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants