-
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: share TCC's business action context to phase 2 with api #3642
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3642 +/- ##
=============================================
- Coverage 51.56% 51.33% -0.23%
- Complexity 3564 3575 +11
=============================================
Files 641 645 +4
Lines 21624 21798 +174
Branches 2710 2738 +28
=============================================
+ Hits 11150 11190 +40
- Misses 9342 9470 +128
- Partials 1132 1138 +6
|
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 changes 1.5.0md
之前 @slievrly 提到的一个功能点: |
done, PTAL |
tcc/src/main/java/io/seata/rm/tcc/interceptor/ActionInterceptorHandler.java
Outdated
Show resolved
Hide resolved
tcc/src/main/java/io/seata/rm/tcc/interceptor/ActionInterceptorHandler.java
Outdated
Show resolved
Hide resolved
tcc/src/main/java/io/seata/rm/tcc/api/BusinessActionContextUtil.java
Outdated
Show resolved
Hide resolved
tcc/src/main/java/io/seata/rm/tcc/api/BusinessActionContextUtil.java
Outdated
Show resolved
Hide resolved
tcc/src/main/java/io/seata/rm/tcc/interceptor/ActionInterceptorHandler.java
Show resolved
Hide resolved
1. move isDelayReport to BusinessActionContext 2. add a new params to judge whether actionContext has changed or not
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.
1.5.0.md
文件里加一下你的PR吧。
1. add javadoc and optimize code
…nto tcc-context � Conflicts: � changes/1.5.0.md � changes/en-us/1.5.0.md
tcc/src/main/java/io/seata/rm/tcc/interceptor/ActionInterceptorHandler.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
feature: provide an api to share TCC's business action context to phase 2
新功能: 为TCC二阶段传参提供api接口
主要思路:
在TCC一阶段过程中,提供给用户API接口
io.seata.rm.tcc.api.BusinessActionContextUtil#addContext
,此接口包装branchReport()
方法,TC侧的branchReport接口支持application_data
的更新。用户在一阶段过程中可以操控此接口完成分支信息上报(即业务参数上报到TC侧),二阶段再由TC下发给RM完成数据传递。此实现的二阶段参数传递不依赖rm数据源。主要变更说明:
io.seata.rm.tcc.api.BusinessActionContextUtil#addContext
TwoPhaseBusinessAction
中开启isDelayReport
后,用户调用(多次)addContext
并不会马上进行report,而是在一阶段方法执行完成后统一上报以提高性能优化为
Ⅱ. Does this pull request fix one issue?
fixes #3150
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews