-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Conversation
Codecov Report
@@ 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
|
server/src/main/java/io/seata/server/storage/redis/lock/RedisLocker.java
Outdated
Show resolved
Hide 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.
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
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
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, but map.size() > 0
modify to map.isEmpty()
server/src/main/java/io/seata/server/storage/redis/lock/RedisLocker.java
Outdated
Show resolved
Hide 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.
LGTM
Ⅰ. 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