-
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: keep using origin goroutine when doing retry in commit phase #16849
Conversation
/run-all-tests |
/run-mybatis-test |
Codecov Report
@@ Coverage Diff @@
## master #16849 +/- ##
===========================================
Coverage 80.5357% 80.5357%
===========================================
Files 507 507
Lines 138793 138793
===========================================
Hits 111778 111778
Misses 18337 18337
Partials 8678 8678 |
store/tikv/2pc.go
Outdated
@@ -46,11 +46,12 @@ import ( | |||
type twoPhaseCommitAction interface { | |||
handleSingleBatch(*twoPhaseCommitter, *Backoffer, batchMutations) error | |||
tiKVTxnRegionsNumHistogram() prometheus.Observer | |||
inRetry() bool |
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.
inRetryCommit to be exact?
Maybe we don't need to add this method to the interface.
store/tikv/2pc.go
Outdated
@@ -527,7 +548,7 @@ func (c *twoPhaseCommitter) doActionOnBatches(bo *Backoffer, action twoPhaseComm | |||
return nil | |||
} | |||
|
|||
if len(batches) == 1 { | |||
if len(batches) == 1 || action.inRetry() { |
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 only handle the first batch?
Other batches are left uncommitted?
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.
orz, I write a bug
/run-all-tests |
LGTM |
1 similar comment
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
/merge |
/run-all-tests |
@lysu merge failed. |
/run-integration-copr-test |
cherry pick to release-4.0 in PR #16876 |
What problem does this PR solve?
Issue Number: close #15995
Problem Summary:
make goroutine count in retry commit-phase can be controlled by
committer-concurrency
What is changed and how it works?
Proposal: xxx
What's Changed:
no longer fork new goroutine when retry
How it Works:
no longer fork new goroutine when retry
Related changes
Check List
Tests
Side effects
Release note
make goroutine count in retry commit-phase can be controlled by
committer-concurrency
This change is