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

optimize: opt ContextCore, can be set 'Object' value #3102

Merged
merged 6 commits into from
Sep 14, 2020

Conversation

wangliang181230
Copy link
Contributor

@wangliang181230 wangliang181230 commented Sep 10, 2020

Ⅰ. Describe what this PR did

optimize: opt ContextCore, can be set 'Object' value.
优化ContextCore,可设置Object值。

优化的目的:

RootContext.getBranchType()RootContext.unbindBranchType()方法的返回类型由String变为BranchType,部分判断方法的性能会更高,代码也会更简洁易读。

Ⅱ. Does this pull request fix one issue?

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2020

Codecov Report

Merging #3102 into develop will decrease coverage by 0.00%.
The diff coverage is 56.66%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3102      +/-   ##
=============================================
- Coverage      50.56%   50.55%   -0.01%     
+ Complexity      3103     3100       -3     
=============================================
  Files            599      599              
  Lines          19515    19516       +1     
  Branches        2404     2405       +1     
=============================================
- Hits            9867     9866       -1     
  Misses          8657     8657              
- Partials         991      993       +2     
Impacted Files Coverage Δ Complexity Δ
...o/seata/rm/datasource/AbstractConnectionProxy.java 11.34% <0.00%> (ø) 5.00 <0.00> (ø)
...a/io/seata/rm/datasource/exec/ExecuteTemplate.java 6.45% <0.00%> (ø) 2.00 <1.00> (ø)
...java/io/seata/spring/tcc/TccActionInterceptor.java 11.36% <0.00%> (ø) 2.00 <0.00> (ø)
...c/main/java/io/seata/core/context/RootContext.java 55.55% <60.00%> (+1.01%) 13.00 <4.00> (ø)
...baba/AlibabaDubboTransactionPropagationFilter.java 52.38% <80.00%> (ø) 8.00 <0.00> (ø)
...dubbo/ApacheDubboTransactionPropagationFilter.java 55.00% <80.00%> (ø) 8.00 <0.00> (ø)
...seata/core/context/FastThreadLocalContextCore.java 85.71% <100.00%> (ø) 4.00 <0.00> (ø)
.../io/seata/core/context/ThreadLocalContextCore.java 33.33% <100.00%> (ø) 1.00 <0.00> (ø)
...o/seata/server/coordinator/DefaultCoordinator.java 54.63% <0.00%> (-0.52%) 28.00% <0.00%> (-2.00%)
...in/java/io/seata/server/session/GlobalSession.java 82.43% <0.00%> (-0.46%) 70.00% <0.00%> (-1.00%)

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

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 merged commit 186c8ac into apache:develop Sep 14, 2020
@wangliang181230 wangliang181230 deleted the optimize-ContextCore branch September 14, 2020 23:22
@funky-eyes funky-eyes added this to the 1.4.0 milestone Sep 15, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants