-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
store/tikv: add and fix some metrics for the new retry logic #25123
Conversation
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
6318331
to
ce21836
Compare
ce21836
to
17cffa6
Compare
17cffa6
to
81eb9d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding metrics for commitDetail
? i.e., backoff time and count of a single transaction commit.
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
boSleep := int64(singleBatchBackoffer.GetTotalSleep()) * int64(time.Millisecond) | ||
if boSleep > commitDetail.Mu.CommitBackoffTime { | ||
commitDetail.Mu.CommitBackoffTime = boSleep | ||
commitDetail.Mu.BackoffTypes = singleBatchBackoffer.GetTypes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need
commitDetail.Mu.BackoffTypes = append(batchExe.backoffer.GetTypes(), singleBatchBackoffer.GetTypes()...)
clone
seems not inherit parent's backoff types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I thought the backoff types are inherited... It looks difficult to handle the backoff types T_T
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 5774f5f
|
/run-monitor-test |
Visit the grafana server at: http://172.16.5.5:30721, it will last for 5 hours |
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
/run-monitor-test |
Visit the grafana server at: http://172.16.5.5:32362, it will last for 5 hours |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 2c65e23
|
/run-cherry-picker |
cherry pick to release-5.1 in PR #25212 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
What is changed and how it works?
The exit cause of the replica selector is recorded in the metrics. The retry time of a request is recorded in a histogram.
The commit backoff time is improved. Because prewrite is mostly parallel, we only record the max total sleep of all backoffs in prerwite. (But this is not the real time spent on prewrite because of the concurrency limit.)
The backoff time of the commit phase is not counted in the batch executor.
commitTxn
adds the time to the final commit backoff time.Check List
Tests
Release note
No release note