statistics: drop old stats meta after truncate a table - #49664
Merged
ti-chi-bot[bot] merged 5 commits intoDec 22, 2023
Conversation
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #49664 +/- ##
================================================
+ Coverage 70.9801% 71.3594% +0.3793%
================================================
Files 1368 1424 +56
Lines 398761 420826 +22065
================================================
+ Hits 283041 300299 +17258
- Misses 95945 101583 +5638
+ Partials 19775 18944 -831
Flags with carried forward coverage won't be shown. Click here to find out more.
|
hawkingrei
approved these changes
Dec 21, 2023
Member
Author
|
/hold |
0xPoe
commented
Dec 21, 2023
| } | ||
|
|
||
| // Remove the old table stats. | ||
| if err := h.statsWriter.ResetTableStats2KVForDrop(droppedTableInfo.ID); err != nil { |
Member
Author
There was a problem hiding this comment.
We should drop all partitions as well.
qw4990
approved these changes
Dec 21, 2023
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hawkingrei, qw4990 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
0xPoe
marked this pull request as draft
December 21, 2023 12:10
Member
Author
|
/unhold |
0xPoe
marked this pull request as ready for review
December 22, 2023 05:11
Reminiscent
pushed a commit
to Reminiscent/tidb
that referenced
this pull request
May 26, 2026
This semantically backports: pingcap#49664 Original commit: 98236ca statistics: drop old stats meta after truncate a table (pingcap#49664) The v7.5.6 backport carries the old TableInfo in the existing DDL event path and uses ResetTableStats2KVForDrop to mark stale stats for GC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #49663
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.