Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary error logs when table statistics are locked and tidb_enable_historical_stats is on #57628

Open
Rustin170506 opened this issue Nov 22, 2024 · 1 comment · May be fixed by #57636
Open
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. component/statistics severity/minor sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@Rustin170506
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Create a TiDB cluster
  2. Enable tidb_enable_historical_stats
  3. Create a table and insert more than 1000 rows
  4. Analyze the table and lock the stats: lock stats table_name
  5. Continue to update the table's data
  6. Check the logs

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

There are no error logs.

3. What did you see instead (Required)

There are a lot of logs saying that the stats meta is missing.

4. What is your TiDB version? (Required)

master

@Rustin170506 Rustin170506 added type/bug The issue is confirmed as a bug. component/statistics sig/planner SIG: Planner labels Nov 22, 2024
@Rustin170506
Copy link
Member Author

[2024/11/22 15:48:27.098 +08:00] [ERROR] [history_stats.go:86] ["record historical stats meta failed"] [table-id=104] [version=454102012937109570] [source="flush stats"] [error="no historical meta stats can be recorded"]
[2024/11/22 15:48:27.103 +08:00] [INFO] [range_task.go:276] ["range task finished"] [name=resolve-locks-runner] [startKey=] [endKey=] ["cost time"=9.324917ms] ["completed regions"=64]
[2024/11/22 15:48:27.103 +08:00] [INFO] [gc_worker.go:1227] ["finish resolve locks"] [category="gc worker"] [uuid=64d4b130ca40015] [safePoint=454101855650709504] [regions=64]
[2024/11/22 15:49:27.081 +08:00] [INFO] [gc_worker.go:374] ["there's already a gc job running, skipped"] [category="gc worker"] ["leaderTick on"=64d4b130ca40015]
[2024/11/22 15:49:37.099 +08:00] [ERROR] [history_stats.go:86] ["record historical stats meta failed"] [table-id=104] [version=454102031287189605] [source="flush stats"] [error="no historical meta stats can be recorded"]

@Rustin170506 Rustin170506 added affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/minor labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. component/statistics severity/minor sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant