-
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: tcc-mode commit and rollback method support @BusinessActionContextParameter("opId") long opId
#3823
feature: tcc-mode commit and rollback method support @BusinessActionContextParameter("opId") long opId
#3823
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3823 +/- ##
=============================================
+ Coverage 40.67% 40.72% +0.04%
- Complexity 2991 3007 +16
=============================================
Files 676 676
Lines 22614 22660 +46
Branches 2808 2813 +5
=============================================
+ Hits 9199 9228 +29
- Misses 12564 12581 +17
Partials 851 851
|
@BusinessActionContextParameter("opId") long opId
想了下,Commit和Rollback方法的入参是否可以不同?如果肯定相同的话,请忽略我的这个疑问。 |
tcc/src/main/java/io/seata/rm/tcc/api/TwoPhaseBusinessAction.java
Outdated
Show resolved
Hide resolved
暂时是不是先考虑二阶段方法参数列表保持一致。如果以后有场景或是明确需求,再考虑??如果二阶段方法参数还不一样,那TwoPhaseBusinessAction注解里加的定义参数类型的数组,意义好像也不大了?或是还需要定义更多的数组,commit方法参数的数组,rollback方法参数的数组,使用起来好像就更麻烦了 |
tcc/src/main/java/io/seata/rm/tcc/remoting/parser/DefaultRemotingParser.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
- 一处代码重构一下。
- 1.5.0.md补充一下PR信息。
其他我没问题了。
tcc/src/main/java/io/seata/rm/tcc/remoting/parser/DefaultRemotingParser.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
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
@@ -192,11 +195,15 @@ private static boolean insertTCCFenceLog(Connection conn, String xid, Long branc | |||
* @param status the tcc fence status |
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.
@param args
@@ -51,13 +53,14 @@ boolean prepare(BusinessActionContext actionContext, | |||
* @param actionContext the action context | |||
* @return the boolean | |||
*/ | |||
boolean commit(BusinessActionContext actionContext); | |||
boolean commit(BusinessActionContext actionContext, | |||
@BusinessActionContextParameter("tccParam") TccParam param, @Param("a") Integer a); | |||
|
|||
/** | |||
* Rollback boolean. | |||
* | |||
* @param actionContext the action context |
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.
@param param
麻烦处理一下代码冲突 |
done |
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 for @tanzzj
tcc/src/main/java/io/seata/rm/tcc/remoting/parser/DefaultRemotingParser.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
Ⅰ. Describe what this PR did
tcc模式,commit和rollback方法,支持
@BusinessActionContextParameter("opId") long opId
方式Ⅱ. Does this pull request fix one issue?
Some improvments abount TCC are in planning or in progress?
fixes #2421
Ⅲ. Why don't you add test cases (unit test/integration test)?
不需要
Ⅳ. Describe how to verify it
新feature
Ⅴ. Special notes for reviews