pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.41k stars 5.85k forks source link

Too many unnecessary log for sync load when stats is not exists #57804

Open lilinghai opened 3 days ago

lilinghai commented 3 days ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

many sysbench tables and run read_write tidb always print the log but the column pad stats is not collected.

[2024/11/28 11:56:52.620 +00:00] [WARN] [stats_syncload.go:412] ["fail to get hist meta for this histogram, possibly a deleted one"] [table_id=1285152] [hist_id=3] [is_index=false]
[2024/11/28 11:56:52.623 +00:00] [WARN] [stats_syncload.go:412] ["fail to get hist meta for this histogram, possibly a deleted one"] [table_id=1201116] [hist_id=3] [is_index=false]
[2024/11/28 11:56:52.624 +00:00] [WARN] [stats_syncload.go:412] ["fail to get hist meta for this histogram, possibly a deleted one"] [table_id=1306426] [hist_id=3] [is_index=false]
[2024/11/28 11:56:52.629 +00:00] [WARN] [stats_syncload.go:412] ["fail to get hist meta for this histogram, possibly a deleted one"] [table_id=1357610] [hist_id=3] [is_index=false]
[2024/11/28 11:56:52.634 +00:00] [WARN] [stats_syncload.go:412] ["fail to get hist meta for this histogram, possibly a deleted one"] [table_id=1236468] [hist_id=3] [is_index=false]
[2024/11/28 11:56:52.634 +00:00] [WARN] [stats_syncload.go:412] ["fail to get hist meta for this histogram, possibly a deleted one"] [table_id=1393198] [hist_id=3] [is_index=false]
...

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-232-g924784aa3e Edition: Community Git Commit Hash: 924784aa3e57db874633eff00f435586eaf05bd8 Git Branch: HEAD UTC Build Time: 2024-11-28 02:37:38 GoVersion: go1.23.3 Race Enabled: false

winoros commented 3 days ago

It's should be introduced by https://github.com/pingcap/tidb/pull/53399 and https://github.com/pingcap/tidb/pull/53298. These prs make the status standing for no memory object for one column a complex status. In lite init, no memory object for one column means that the column has no stats. In non-lite init+currently init, no memory object for the column can also mean that we haven't read it from memory.

lance6716 commented 3 days ago

duplicated with https://github.com/pingcap/tidb/issues/56740