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: datasource auto proxy #3588

Merged
merged 12 commits into from
May 8, 2021

Conversation

selfishlover
Copy link
Contributor

@selfishlover selfishlover commented Mar 22, 2021

Ⅰ. Describe what this PR did

Simplify the logic of datasource auto proxy, reduce redundant code by merging them into one processor.

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

Added an integration test which simulates 3 major ways how user would register their DataSource bean.

Ⅳ. Describe how to verify it

Add project's spring boot starter to your project dependency, register Datasource bean in the way you like, test GlobalLock or GlobalTransaction to see whether it works. Or just run the new integration test to verify it.
fixes #3701

@funky-eyes funky-eyes added this to the 1.5.0 milestone Apr 14, 2021
@funky-eyes funky-eyes requested review from xingfudeshi and wangliang181230 and removed request for xingfudeshi April 30, 2021 15:25
@codecov-commenter
Copy link

codecov-commenter commented May 6, 2021

Codecov Report

Merging #3588 (06f7413) into develop (23f4933) will increase coverage by 0.24%.
The diff coverage is 70.37%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3588      +/-   ##
=============================================
+ Coverage      51.63%   51.88%   +0.24%     
- Complexity      3518     3533      +15     
=============================================
  Files            640      639       -1     
  Lines          21420    21408      -12     
  Branches        2671     2665       -6     
=============================================
+ Hits           11061    11108      +47     
+ Misses          9253     9191      -62     
- Partials        1106     1109       +3     
Impacted Files Coverage Δ Complexity Δ
...utoconfigure/SeataDataSourceAutoConfiguration.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ation/datasource/AutoDataSourceProxyRegistrar.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ion/datasource/SeataAutoDataSourceProxyAdvice.java 70.83% <66.66%> (+70.83%) 3.00 <3.00> (+3.00)
...on/datasource/SeataAutoDataSourceProxyCreator.java 69.44% <69.69%> (+69.44%) 8.00 <6.00> (+8.00)
...g/annotation/datasource/DataSourceProxyHolder.java 75.00% <100.00%> (+75.00%) 3.00 <3.00> (+3.00)
...torage/file/store/FileTransactionStoreManager.java 57.69% <0.00%> (+0.64%) 29.00% <0.00%> (+1.00%)

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.

@funky-eyes funky-eyes added module/seata-spring-boot-starter seata-spring-boot-starter module module/spring spring module type: optimize labels May 6, 2021
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 1ab63ea into apache:develop May 8, 2021
@selfishlover selfishlover deleted the optimize-datasource-autoProxy branch May 8, 2021 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/seata-spring-boot-starter seata-spring-boot-starter module module/spring spring module type: optimize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

配置seata.enabled=false后项目启动报错
4 participants