Skip to content

Conversation

0xPoe
Copy link
Member

@0xPoe 0xPoe commented Nov 12, 2024

What problem does this PR solve?

Issue Number: close #57230

Problem Summary:

What changed and how does it work?

We overlooked handling the drop schema event in the stats DDL handler. In this PR, we'll address this by cleaning up the dropped tables one by one.

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.

修复统计信息在整个数据库被删除后无法清理的问题
Fix the issue where statistics cannot be cleaned up after the entire database is deleted.

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 12, 2024
Copy link
Member Author

@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.

🔢 Self-check (PR reviewed by myself and ready for feedback.)

@0xPoe 0xPoe requested review from winoros and AilinKid November 12, 2024 04:13
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 36.36364% with 7 lines in your changes missing coverage. Please review.

Project coverage is 74.6133%. Comparing base (a5832b4) to head (c2e60d6).
Report is 229 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #57309        +/-   ##
================================================
+ Coverage   72.9011%   74.6133%   +1.7121%     
================================================
  Files          1668       1720        +52     
  Lines        461134     476849     +15715     
================================================
+ Hits         336172     355793     +19621     
+ Misses       104308      98843      -5465     
- Partials      20654      22213      +1559     
Flag Coverage Δ
integration 49.1011% <0.0000%> (?)
unit 72.3385% <36.3636%> (+0.0538%) ⬆️

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

Components Coverage Δ
dumpling 52.7673% <ø> (ø)
parser ∅ <ø> (∅)
br 57.7602% <ø> (+12.6509%) ⬆️

@0xPoe
Copy link
Member Author

0xPoe commented Nov 12, 2024

/retest

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 13, 2024
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Dec 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, winoros

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 Dec 3, 2024
Copy link

ti-chi-bot bot commented Dec 3, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-13 13:21:55.886849536 +0000 UTC m=+448878.077718526: ☑️ agreed by winoros.
  • 2024-12-03 06:32:56.189474248 +0000 UTC m=+1136563.809128763: ☑️ agreed by AilinKid.

@ti-chi-bot ti-chi-bot bot merged commit b273109 into pingcap:master Dec 3, 2024
25 checks passed
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Dec 11, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 11, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #58175.

@0xPoe 0xPoe added needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Dec 11, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #58178.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 11, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #58179.

@ti-chi-bot ti-chi-bot bot removed the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiDB cannot clean up the stats meta after dropping the database
4 participants