Skip to content

Conversation

@0xPoe
Copy link
Member

@0xPoe 0xPoe commented Jan 15, 2026

What problem does this PR solve?

Issue Number: close #65426

Problem Summary:

  • Small post-ANALYZE modifications could stay unflushed because delta InitTime wasn't persisted, so the time-based dump never triggered.

What changed and how does it work?

  • Persist TableDelta.InitTime across sweeps and write it back when deciding to skip a dump.
  • Add a regression test and test-only accessors for the dump duration threshold.
  • Update Bazel files via make bazel_prepare for the new test file.

Check List

Tests

  • Unit test
    • go test ./pkg/statistics/handle/usage -run TestDumpStatsDeltaPersistsInitTime --tags=intest
  • 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.

Fix stats delta flushing after small modifications by persisting delta init time for time-based dumps.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note Denotes a PR that will be considered when it comes time to generate release notes. component/statistics size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. sig/planner SIG: Planner labels Jan 15, 2026
@0xPoe 0xPoe force-pushed the poe-patch-modify-count-update branch from 519a233 to b8f9f66 Compare January 15, 2026 12:24
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 15, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 15, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign 0xpoe for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.8345%. Comparing base (8333420) to head (b8f9f66).

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #65586        +/-   ##
================================================
- Coverage   77.8457%   77.8345%   -0.0113%     
================================================
  Files          1978       1902        -76     
  Lines        542181     529874     -12307     
================================================
- Hits         422065     412425      -9640     
+ Misses       118457     116973      -1484     
+ Partials       1659        476      -1183     
Flag Coverage Δ
integration 44.2513% <0.0000%> (-3.9385%) ⬇️
unit 76.1198% <90.0000%> (-0.3394%) ⬇️

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

Components Coverage Δ
dumpling 56.7974% <ø> (ø)
parser ∅ <ø> (∅)
br 48.7901% <ø> (-12.3524%) ⬇️
🚀 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 Jan 15, 2026

@0xPoe: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/unit-test b8f9f66 link true /test unit-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@0xPoe 0xPoe changed the title statistics: persist stats delta init time WIP: statistics: persist stats delta init time Jan 15, 2026
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/statistics do-not-merge/needs-triage-completed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

modify_count is failing to update

1 participant