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: hikari datasource auto proxy fail #5134

Merged
merged 12 commits into from
Dec 12, 2022
Merged

Conversation

funky-eyes
Copy link
Contributor

@funky-eyes funky-eyes commented Dec 7, 2022

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

springboot的DataSourceAutoConfiguration优先级非常低,而seata SeataDataSourceAutoConfiguration 需要等到datasourcebean存在后再去代理,导致了优先级一定会高于DataSourceAutoConfiguration,DataSourceAutoConfiguration中有hikari的自动datasource装载,导致hikari的bean先加载后,Seata的SeataAutoDataSourceProxyCreator并没有进行构建,导致了二阶段如果rm重启了进行下发是找不到对应的rmchannel的.

1.5.2
lQLPJwr-u_Ff0UzNBBDNB4CwSw8D_v4N9PEDjNuOkABaAA_1920_1040

1.6.0-SNAPSHOT 此pr的效果
lQLPJxYBQgySjIzNBBDNB4CwzTociIJOLN8DjNtabQBhAA_1920_1040
lQLPJws_TwoWkQzNBBDNB4Cwr04FqaPAAlYDjNtFa0CEAA_1920_1040

对其他datasource无影响,如druid
image

Ⅱ. Does this pull request fix one issue?

fixes #4970
fixes #4976

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@funky-eyes funky-eyes requested review from wangliang181230 and xingfudeshi and removed request for wangliang181230 December 7, 2022 14:35
@funky-eyes funky-eyes changed the title bugfix: hikari dataosurce auto proxy fail bugfix: hikari datasource auto proxy fail Dec 7, 2022
@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2022

Codecov Report

Merging #5134 (97e0115) into develop (3e5af28) will decrease coverage by 0.39%.
The diff coverage is 37.50%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #5134      +/-   ##
=============================================
- Coverage      49.35%   48.95%   -0.40%     
- Complexity      4145     4166      +21     
=============================================
  Files            737      741       +4     
  Lines          26190    26521     +331     
  Branches        3232     3294      +62     
=============================================
+ Hits           12925    12984      +59     
- Misses         11881    12129     +248     
- Partials        1384     1408      +24     
Impacted Files Coverage Δ
...utoconfigure/SeataDataSourceAutoConfiguration.java 0.00% <ø> (ø)
...src/main/java/io/seata/rm/tcc/TCCFenceHandler.java 0.00% <0.00%> (ø)
...eata/rm/tcc/store/db/TCCFenceStoreDataBaseDAO.java 0.00% <ø> (ø)
...o/seata/rm/tcc/store/db/sql/TCCFenceStoreSqls.java 0.00% <ø> (ø)
...igure/properties/config/ConfigNacosProperties.java 58.33% <25.00%> (-4.17%) ⬇️
...e/properties/registry/RegistryNacosProperties.java 42.22% <25.00%> (-1.69%) ⬇️
...java/io/seata/config/nacos/NacosConfiguration.java 11.62% <75.00%> (ø)
...overy/registry/nacos/NacosRegistryServiceImpl.java 14.89% <75.00%> (ø)
...a/io/seata/rm/datasource/xa/ConnectionProxyXA.java 56.05% <100.00%> (ø)
...o/seata/server/session/SessionStatusValidator.java 53.84% <0.00%> (-7.70%) ⬇️
... and 20 more

@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. module/seata-spring-boot-starter seata-spring-boot-starter module labels Dec 7, 2022
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

@slievrly slievrly added this to the 1.6.0 milestone Dec 11, 2022
Copy link
Contributor

@wangliang181230 wangliang181230 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

@funky-eyes funky-eyes merged commit bf99018 into apache:develop Dec 12, 2022
zw201913 pushed a commit to zw201913/seata that referenced this pull request Dec 12, 2022
…o 1114_for_5073

* '1114_for_5073' of https://github.com/zw201913/seata:
  bugfix: hikari datasource auto proxy fail (apache#5134)
  bugfix: rollback active xa connection fail (apache#5131)
  optimize: support oracle on delete tccfence logs  (apache#5124)
  feature: support passing `contextPath` parameter to Nacos client (apache#5111)
  bugfix:NPE caused when there is no @GlobalTransactional annotation on the RM side  (apache#5109)
  bugfix: Druid disable oracle implicit cache (apache#5098)
  bugfix: fix access key loss after server restart (apache#5097)
  optimize: remove druid dependency in ConnectionProxy (apache#5104)
  bugfix:fix ClassNotFoundException during the ZK unit test (apache#5101)
  bugfix: fix when seata and jpa are used together, their AutoConfiguration order is incorrect (apache#5092)
  optimize: lock priority attempts to insert (apache#4681)
  bugfix: update join condition placeholder param error (apache#5052)
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 type: bug Category issues or prs related to bug.
Projects
None yet
5 participants