Backoff_types field in slow_query system table may not work
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
For a long time, we found our slow logs are inaccurate or has important information missing.
This commit: https://github.com/pingcap/tidb/commit/8c79898896455555b401cf1c093b625765cd6312 , splitted the `Backoff_types` field of the slow log files into `Prewrite_Backoff_types` and `Commit_Backoff_types`, and we expect it can give us some more fine-grained information.
However, the `information_schema.slow_query` system table still has only the `Backoff_types` column. This might cause when querying the table by SQL and it tries to parse the slow log fiels, it might always return empty result for the `Backoff_types` column, as there's no field with matching name. And further, this affects the information shown on TiDB dashboard.
\* Note: this problem was found in code, and haven't been verified by test for now.
By the way, the other backoff related columns in the table looks have inconsistent semantics to each other. E.g., while `Backoff_types` looks only including backoffs happend during write, `Backoff_time` and `Backoff_total` looks different. There might be more problems here.
### What is your TiDB version? (Required)
master. But it should affects all LTS versions from v6.5.x.
Contributor guide
Assessment
This issue has not been assessed yet.