-
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: tiny refactoring, change twoPhaseCommitAction
to interface
#12845
Conversation
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
type actionCommit struct{} | ||
type actionCleanup struct{} | ||
type actionPessimisticLock struct{} | ||
type actionPessimisticRollback struct{} |
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.
type (
actionPrewrite struct{}
actionCommit struct{}
actionCleanup struct{}
actionPessimisticLock struct{}
actionPessimisticRollback struct{}
)
we can avoid duplicate type
words~
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
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-unit-test |
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 |
/run-all-tests |
cherry pick to release-3.1 failed |
cherry pick to release-3.0 failed |
@tiancaiamao Need cherry pick to 3.1? |
What problem does this PR solve?
We define
type twoPhaseCommitAction int
and useswitch case
on 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
twoPhaseCommitAction
to interface.Check List
Tests
Related changes
This refactoring is prepared for an incoming bug-fix PR