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

feature: support the reentrant lock in redis module #2950

Merged
merged 10 commits into from
Jul 31, 2020

Conversation

yujianfei1986
Copy link
Contributor

@yujianfei1986 yujianfei1986 commented Jul 30, 2020

Ⅰ. Describe what this PR did

redis支持可重入锁。适应场景:在同一事务中,对同一条数据进行多次操作的情景

Ⅱ. Does this pull request fix one issue?

自己发现 fixes #2938

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

同一事务可以先后两次操作同一条数据,流程可以正常进行,而不是报获取不到锁的异常

Ⅴ. Special notes for reviews

Support the reentrant lock in redis module

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2020

Codecov Report

Merging #2950 into develop will increase coverage by 0.01%.
The diff coverage is 70.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2950      +/-   ##
=============================================
+ Coverage      50.22%   50.23%   +0.01%     
- Complexity      3051     3053       +2     
=============================================
  Files            599      599              
  Lines          19443    19459      +16     
  Branches        2387     2390       +3     
=============================================
+ Hits            9766     9776      +10     
- Misses          8696     8700       +4     
- Partials         981      983       +2     
Impacted Files Coverage Δ Complexity Δ
...o/seata/server/storage/redis/lock/RedisLocker.java 39.53% <70.00%> (+3.25%) 12.00 <2.00> (+2.00)

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes added first-time contributor first-time contributor TC/store store mode labels Jul 30, 2020
Copy link
Contributor

@ph3636 ph3636 left a comment

Choose a reason for hiding this comment

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

LGTM

@l81893521 l81893521 added the module/server server module label Jul 31, 2020
@l81893521 l81893521 added this to the 1.4.0 milestone Jul 31, 2020
Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

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

LGTM, but map.size() > 0 modify to map.isEmpty()

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 changed the title feature: Support the reentrant lock in redis module feature: support the reentrant lock in redis module Jul 31, 2020
@slievrly slievrly merged commit ecbac3f into apache:develop Jul 31, 2020
l81893521 pushed a commit to l81893521/seata that referenced this pull request Oct 22, 2020
hicf pushed a commit to hicf/seata that referenced this pull request Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time contributor first-time contributor module/server server module TC/store store mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

store mode是redis时分支事务提交获取不到全局锁的bug
7 participants