Skip to content
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

Merged
merged 2 commits into from
Jul 23, 2019

Conversation

zjinlei
Copy link
Contributor

@zjinlei zjinlei commented Jul 23, 2019

Ⅰ. 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

@codecov-io
Copy link

codecov-io commented Jul 23, 2019

Codecov Report

Merging #1338 into develop will increase coverage by <.01%.
The diff coverage is 90.9%.

Impacted file tree graph

@@              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
Impacted Files Coverage Δ Complexity Δ
...a/io/seata/core/store/db/LockStoreDataBaseDAO.java 51.61% <90.9%> (+1.27%) 20 <1> (+2) ⬆️
...server/store/file/FileTransactionStoreManager.java 45.64% <0%> (-0.35%) 19% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcc1bd9...1b0e854. Read the comment docs.

@zjinlei zjinlei changed the title bugfix Lock is not acquired when multiple branches have cross locks#1247 bugfix: Lock is not acquired when multiple branches have cross locks#1247 Jul 23, 2019
canLock &= false;
break;
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slievrly slievrly requested a review from zhangthen July 23, 2019 03:05
@zhangthen zhangthen merged commit 2cc8f36 into apache:develop Jul 23, 2019
@zjinlei zjinlei deleted the bugfix/1247/crossLockUnAcquired branch July 23, 2019 03:43
@wangliang181230 wangliang181230 added this to the 0.8.1 milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RM failed to acquire lock
5 participants