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 mysql-loadbalance resource id error #4355

Merged
merged 7 commits into from
Feb 8, 2022

Conversation

funky-eyes
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

fixes #4344

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@funky-eyes funky-eyes added this to the 1.5.0 milestone Jan 29, 2022
@funky-eyes funky-eyes added module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug. labels Jan 29, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2022

Codecov Report

Merging #4355 (8143022) into develop (76b3e88) will increase coverage by 0.01%.
The diff coverage is 64.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4355      +/-   ##
=============================================
+ Coverage      48.75%   48.77%   +0.01%     
- Complexity      3903     3908       +5     
=============================================
  Files            733      733              
  Lines          24829    24846      +17     
  Branches        3057     3061       +4     
=============================================
+ Hits           12106    12119      +13     
- Misses         11444    11447       +3     
- Partials        1279     1280       +1     
Impacted Files Coverage Δ
...n/java/io/seata/rm/datasource/DataSourceProxy.java 52.94% <64.00%> (+5.88%) ⬆️

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

@funky-eyes funky-eyes changed the title bugfix: fix mysql-loadbalance resouceid error bugfix: fix mysql-loadbalance resource id error Feb 8, 2022
Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

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

LGTM

initPGResourceId();
} else if (JdbcConstants.ORACLE.equals(dbType) && userName != null) {
initDefaultResourceId();
resourceId = resourceId + "/" + userName;
Copy link
Contributor

Choose a reason for hiding this comment

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

并发获取resourceId情况下这里貌似会有问题

Copy link
Contributor Author

Choose a reason for hiding this comment

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

并发获取resourceId情况下这里貌似会有问题

datasource以及connection本身都不保证线程安全

@funky-eyes funky-eyes merged commit b62f03e into apache:develop Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

事务回滚失败,mysql 使用 loadbalance 进行mysql 负载均衡,RM 调用发起回滚执行异常
5 participants