store/tikv: tiny refactoring, change twoPhaseCommitAction to interface#12845
Merged
sre-bot merged 2 commits intopingcap:masterfrom Oct 21, 2019
Merged
store/tikv: tiny refactoring, change twoPhaseCommitAction to interface#12845sre-bot merged 2 commits intopingcap:masterfrom
twoPhaseCommitAction to interface#12845sre-bot merged 2 commits intopingcap:masterfrom
Conversation
Contributor
Author
lysu
reviewed
Oct 21, 2019
| type actionCommit struct{} | ||
| type actionCleanup struct{} | ||
| type actionPessimisticLock struct{} | ||
| type actionPessimisticRollback struct{} |
Contributor
There was a problem hiding this comment.
type (
actionPrewrite struct{}
actionCommit struct{}
actionCleanup struct{}
actionPessimisticLock struct{}
actionPessimisticRollback struct{}
)
we can avoid duplicate type words~
Contributor
|
LGTM |
Member
|
/run-unit-test |
Contributor
|
Your auto merge job has been accepted, waiting for 12608 |
Codecov Report
@@ Coverage Diff @@
## master #12845 +/- ##
===========================================
Coverage 80.0972% 80.0972%
===========================================
Files 465 465
Lines 106980 106980
===========================================
Hits 85688 85688
Misses 14893 14893
Partials 6399 6399 |
Contributor
|
/run-all-tests |
Contributor
|
cherry pick to release-3.1 failed |
Contributor
|
cherry pick to release-3.0 failed |
tiancaiamao
added a commit
to tiancaiamao/tidb
that referenced
this pull request
Oct 29, 2019
sre-bot
pushed a commit
that referenced
this pull request
Oct 30, 2019
Contributor
|
@tiancaiamao Need cherry pick to 3.1? |
XiaTianliang
pushed a commit
to XiaTianliang/tidb
that referenced
this pull request
Dec 21, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
We define
type twoPhaseCommitAction intand useswitch caseon them.I need to closure some data on
pessimisticLockSingleBatch, but I think it's improper to change theto something like
so I think using interface is more flexible.
What is changed and how it works?
change
twoPhaseCommitActionto interface.Check List
Tests
Related changes
This refactoring is prepared for an incoming bug-fix PR