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

feature: The data source proxy mode can be selected as AT or XA #2913

Merged
merged 12 commits into from Jul 30, 2020

Conversation

wangliang181230
Copy link
Contributor

@wangliang181230 wangliang181230 commented Jul 21, 2020

Ⅰ. Describe what this PR did

feature: The data source proxy mode can be selected as AT or XA

通过配置启用自动代理时:

  1. seata.dataSourceProxyMode=AT #默认值,可以不用手动配置
  2. seata.dataSourceProxyMode=XA

通过注解启用自动代理时:

  1. @EnableAutoDataSourceProxy(dataSourceProxyMode = 'AT')
  2. @EnableAutoDataSourceProxy(dataSourceProxyMode = 'XA')

Ⅱ. 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 Jul 21, 2020

Codecov Report

Merging #2913 into develop will decrease coverage by 0.00%.
The diff coverage is 16.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2913      +/-   ##
=============================================
- Coverage      50.26%   50.25%   -0.01%     
- Complexity      3047     3050       +3     
=============================================
  Files            599      599              
  Lines          19415    19430      +15     
  Branches        2381     2384       +3     
=============================================
+ Hits            9758     9764       +6     
- Misses          8679     8690      +11     
+ Partials         978      976       -2     
Impacted Files Coverage Δ Complexity Δ
...ava/io/seata/core/constants/ConfigurationKeys.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...in/java/io/seata/core/constants/DefaultValues.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ing/boot/autoconfigure/SeataAutoConfiguration.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ation/datasource/AutoDataSourceProxyRegistrar.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...g/annotation/datasource/DataSourceProxyHolder.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ion/datasource/SeataAutoDataSourceProxyAdvice.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...on/datasource/SeataAutoDataSourceProxyCreator.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...boot/autoconfigure/properties/SeataProperties.java 45.16% <50.00%> (+0.71%) 7.00 <1.00> (+1.00)
...c/main/java/io/seata/core/context/RootContext.java 54.54% <66.66%> (+2.16%) 13.00 <0.00> (ø)
...in/java/io/seata/server/session/GlobalSession.java 84.16% <0.00%> (+0.45%) 72.00% <0.00%> (+1.00%)
... and 1 more

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.

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.

Copy link
Contributor

@sharajava sharajava left a comment

Choose a reason for hiding this comment

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

建议再深入考虑一下是否必要增加一个配置项。

其他方面个人觉得 OK 的。

script/client/spring/application.yml Show resolved Hide resolved
Copy link
Contributor

@sharajava sharajava left a comment

Choose a reason for hiding this comment

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

it's ok to me

@funky-eyes funky-eyes merged commit 675144b into apache:develop Jul 30, 2020
@funky-eyes funky-eyes added this to the 1.4.0 milestone Jul 30, 2020
@funky-eyes funky-eyes added the module/rm-datasource rm-datasource module label Jul 30, 2020
@wangliang181230 wangliang181230 deleted the feature-XA-AT-switch branch July 30, 2020 09:45
@wangliang181230 wangliang181230 added mode: AT AT transaction mode mode: XA XA transaction mode type: feature Category issues or prs related to feature request. labels Oct 19, 2020
l81893521 pushed a commit to l81893521/seata that referenced this pull request Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mode: AT AT transaction mode mode: XA XA transaction mode module/rm-datasource rm-datasource module type: feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants