retry time causing by pessimistic error is not exactly in slow log
- 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)
I added a unit test case in PR.
We made the scenes that a query `select * from t1 where id=1 for update` generates `WriteConflict` error many times and recorded this query in the slow log.
### 2. What did you expect to see? (Required)
The field `Exec_retry_time` begins at first retry for processing Pessimistic Lock error.
### 3. What did you see instead (Required)
The field `Exec_retry_time` begins at the last retry for processing Pessimistic Lock error.
### 4. What is your TiDB version? (Required)
| Release Version: v6.3.0-alpha-384-g415d03f
Edition: Community
Git Commit Hash: 415d03f956f68c617a196f6a5d6af62ed6f545c1
Git Branch: master
UTC Build Time: 2022-10-13 00:53:54
GoVersion: go1.19
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv |
Contributor guide
Assessment
This issue has not been assessed yet.