statistics_stats_cache metric is wrong in millions tables scenario
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
set @@global.tidb_stats_cache_mem_quota=4GB
million tables and run dml for long time

the actual stats cache is about 7GB

### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)
### 4. What is your TiDB version? (Required)
Release Version: v8.5.0-alpha-318-g7e34efa5b7
Edition: Community
Git Commit Hash: 7e34efa5b7ed3532d14170a3b2aca1090ffa20a7
Git Branch: HEAD
UTC Build Time: 2024-12-11 07:29:27
GoVersion: go1.23.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Contributor guide
Assessment
This issue has not been assessed yet.