Skip to content

updateStatsWorker panic and the stats history data cannot be cleanup #59702

@tiancaiamao

Description

@tiancaiamao

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

A bug observed in our customer's environment.

Their disk is about to full, and we find mysql.stats_history takes a lot of space, 500GB+

Image

They changed tidb_auto_analyze_ratio to 0.0001 during test (and now changed it back to 0.5)

The root cause that mysql.stats_history cannot be freed is that the updateStatsWorker goroutine panic.
This is found from their log:

Image

2. What did you expect to see? (Required)

statistics history data been cleanup correctly.

3. What did you see instead (Required)

Their disk is about to full, there is no way to clean the largest garbage, that is, mysql.stats_history table.

Note, it's on the cloud and the user has no privilege to execute 'truncate mysql.stats_history'

4. What is your TiDB version? (Required)

v7.1.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions