-
Notifications
You must be signed in to change notification settings - Fork 8.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
bugfix: Lock is not acquired when multiple branches have cross locks#1247 #1338
bugfix: Lock is not acquired when multiple branches have cross locks#1247 #1338
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1338 +/- ##
=============================================
+ Coverage 48.63% 48.64% +<.01%
- Complexity 1643 1645 +2
=============================================
Files 332 332
Lines 11521 11527 +6
Branches 1424 1425 +1
=============================================
+ Hits 5603 5607 +4
Misses 5297 5297
- Partials 621 623 +2
Continue to review full report at Codecov.
|
canLock &= false; | ||
break; |
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 break?
db: lock1:xid1 lock2:xid2 lock3:xid1
request: lock1:xid1 lock2:xid1 lock3:xid1
lock3 can add in dbExistedRowKeys?
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.
db: lock2:xid2
request: lock2:xid1
These two global transactions are different. You cannot get the lock this time.
add break is a quick failure
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.
agree
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
Ⅰ. Describe what this PR did
bugfix #1247
Ⅱ. Does this pull request fix one issue?
fixes #1247
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews