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

bugfix: fix the 'RootContext.DEFAULT_BRANCH_TYPE' is wrong in some cases #3214

Conversation

wangliang181230
Copy link
Contributor

@wangliang181230 wangliang181230 commented Oct 22, 2020

Ⅰ. Describe what this PR did

bugfix: fix the RootContext.DEFAULT_BRANCH_TYPE is wrong in some cases.
修复BUG:在部分情况下,RootContext.DEFAULT_BRANCH_TYPE的值有误。

Cases:

  1. springboot项目中,使用配置启用XA自动代理时,而不是使用@EnableAutoDataSourceProxy启用XA自动代理。(这种情况下,XA代理不生效
  2. 手动创建XA代理,并禁用自动代理功能时。(这种情况下,XA代理生效,但是RootContext.DEFAULT_BRANCH_TYPE却是AT

Ⅱ. 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

@wangliang181230 wangliang181230 changed the title bugfix: XA automatic proxy does not work in some cases bugfix: fix the 'RootContext.DEFAULT_BRANCH_TYPE' is wrong in some cases Oct 22, 2020
@wangliang181230 wangliang181230 added this to the 1.4.0 milestone Oct 22, 2020
@codecov-io
Copy link

codecov-io commented Oct 22, 2020

Codecov Report

Merging #3214 into develop will decrease coverage by 0.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3214      +/-   ##
=============================================
- Coverage      51.05%   51.04%   -0.02%     
  Complexity      3258     3258              
=============================================
  Files            609      609              
  Lines          20023    20027       +4     
  Branches        2499     2501       +2     
=============================================
  Hits           10222    10222              
- Misses          8784     8787       +3     
- Partials        1017     1018       +1     
Impacted Files Coverage Δ Complexity Δ
...c/main/java/io/seata/core/context/RootContext.java 50.94% <0.00%> (-6.75%) 19.00 <0.00> (ø)
...ation/datasource/AutoDataSourceProxyRegistrar.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ion/datasource/SeataAutoDataSourceProxyAdvice.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...n/java/io/seata/rm/datasource/DataSourceProxy.java 42.85% <100.00%> (+0.92%) 12.00 <0.00> (ø)
...a/io/seata/rm/datasource/xa/DataSourceProxyXA.java 84.61% <100.00%> (+0.61%) 8.00 <0.00> (ø)
...ta/spring/boot/autoconfigure/StarterConstants.java 100.00% <100.00%> (ø) 1.00 <0.00> (ø)

@wangliang181230 wangliang181230 added module/core core module type: bug Category issues or prs related to bug. labels Oct 23, 2020
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

Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@xingfudeshi xingfudeshi merged commit e699a9d into apache:develop Oct 23, 2020
@wangliang181230 wangliang181230 deleted the bugfix-SeataProperties-invalid-for-ConfigurationFactory branch October 23, 2020 05:34
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
Labels
module/core core module type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants