-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
tikv: refine commit backoff slow log #11757
Conversation
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #11757 +/- ##
===============================================
- Coverage 81.558% 81.4658% -0.0922%
===============================================
Files 435 435
Lines 94095 94156 +61
===============================================
- Hits 76742 76705 -37
- Misses 11867 11963 +96
- Partials 5486 5488 +2 |
/run-all-tests |
@@ -96,7 +97,7 @@ type twoPhaseCommitter struct { | |||
// We use it to guarantee GC worker will not influence any active txn. The value | |||
// should be less than GC life time. | |||
maxTxnTimeUse uint64 | |||
detail *execdetails.CommitDetails | |||
detail unsafe.Pointer |
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.
Why change to unsafe.Pointer
?
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.
in the previous, test was failed due to race condition in https://github.com/pingcap/tidb/pull/11757/files#diff-499c236856cd9ce3300d3f5ccde41a23R441, after this PR detail will be accessed in forked goroutine.
/run-all-tests |
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.
LGTM
PTAL @crazycs520 |
/run-all-tests |
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.
Rest LGTM
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.
LGTM
/run-all-tests |
cherry pick to release-3.0 failed |
cherry pick to release-2.1 failed |
/run-cherry-picker |
cherry pick to release-3.0 failed |
/run-cherry-picker |
cherry pick to release-3.0 failed |
/run-cherry-picker |
cherry pick to release-3.0 failed |
It seems that, not for sure, we failed to cherry-pick this commit to release-2.1. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @lysu PTAL. |
What problem does this PR solve?
tidb/store/tikv/2pc.go
Line 409 in f05a27d
will fork or clone a new backoff to parallel handle key groups and this let backoff time be miss in commit slow log
What is changed and how it works?
after them, we can got log like this:
this insert is slow due to prewrite is slow and backoff take most time in prewrite.
and backoff type is
Backoff_types: [tikvRPC regionMiss]
Check List
Tests
Code changes
Side effects
n/a
Related changes
Need to cherry-pick to the release branch
This change is