-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Conversation
Codecov Report
@@ 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceProxy.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceProxy.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
并发获取resourceId情况下这里貌似会有问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
并发获取resourceId情况下这里貌似会有问题
datasource以及connection本身都不保证线程安全
Ⅰ. 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