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
optimize: check relation of before status and after status when updating global session #4629
Conversation
server/src/main/java/io/seata/server/storage/redis/store/RedisTransactionStoreManager.java
Show resolved
Hide resolved
server/src/main/java/io/seata/server/storage/redis/store/RedisTransactionStoreManager.java
Outdated
Show resolved
Hide resolved
This pull request introduces 1 alert when merging cb80631 into 09832bd - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## develop #4629 +/- ##
=============================================
- Coverage 49.03% 49.03% -0.01%
- Complexity 4056 4067 +11
=============================================
Files 734 735 +1
Lines 25577 25594 +17
Branches 3156 3160 +4
=============================================
+ Hits 12542 12549 +7
- Misses 11699 11705 +6
- Partials 1336 1340 +4
|
server/src/test/java/io/seata/server/session/SessionStatusValidatorTest.java
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
server/src/main/java/io/seata/server/session/SessionStatusValidator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/io/seata/server/session/SessionStatusValidator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/io/seata/server/storage/redis/store/RedisTransactionStoreManager.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
* @param before the global session | ||
* @param after the global session | ||
*/ | ||
public static boolean validateUpdateStatus(GlobalStatus before, GlobalStatus after) { |
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.
A state flow control can be designed.
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.
A state flow control can be designed.
to prevent too many state updates at the same time?
…ing global session (apache#4629)
Ⅰ. Describe what this PR did
redis模式下,检查全局事务状态的转变关系,以下四种方向不允许
rollback(进行中或结束)>> commit(进行中或结束)
commit(进行中或结束)>> rollback(进行中或结束)
timeout(进行中或结束)>> commit(进行中或结束)
commit(进行中或结束)>> timeout(进行中或结束)
Ⅱ. Does this pull request fix one issue?
#4372
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews