-
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: revert the optimization for optimistic conflicts pessimistic #11037
Conversation
@jackysp PTAL |
Codecov Report
@@ Coverage Diff @@
## master #11037 +/- ##
================================================
- Coverage 81.4157% 80.9359% -0.4798%
================================================
Files 419 419
Lines 90598 89304 -1294
================================================
- Hits 73761 72279 -1482
- Misses 11644 11786 +142
- Partials 5193 5239 +46 |
/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
/run-common-test |
/run-unit-test |
/rebuild |
session/pessimistic_test.go
Outdated
syncCh <- struct{}{} | ||
tk.MustQuery("select c from conflict where id = 1").Check(testkit.Rows("3")) | ||
|
||
// Check utdated pessimistic lock is resolved. |
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.
updated
LGTM |
What problem does this PR solve?
The previous optimization return WriteConflict error when an optimistic transaction meets a pessimistic lock, this has the problem that optimistic transaction may reach retry limit soon and failed to resolve lock when pessimistic lock ttl is reached.
What is changed and how it works?
Revert the optimization.
Check List
Tests
Related changes