-
Notifications
You must be signed in to change notification settings - Fork 6.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
Three data sources were configured, but four data sources were created.(shardingsphere-jdbc:5.2.0) #21650
Comments
supplementThe preceding error also occurs in version 5.2.1. |
|
There have been some changes to the JavaConfigAPI since 5.1.2 to 5.2.0. |
@MrXionGe ShardingSphere default mode are |
@zhaojinchao95 |
@zhaojinchao95 |
Yes, you are right. |
@zhaojinchao95 |
Consider doing heap dump to figure out what is the 4th data source instance. |
@TeslaCN |
Bug Report
Which version of ShardingSphere did you use?
5.2.0
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
shardingsphere-jdbc-core
Code
pom.xml(dependencies)
JavaConfig
Description
I created three data sources. A write data source(master_ds) and two read data sources(replica_ds_1&replica_ds_2).
Expected behavior
Initialize the three data sources.
I will see the log for 'hikari' in the console with 3 data sources created.
Actual behavior
There are four data sources created.
![image](https://user-images.githubusercontent.com/23261935/196748994-6df357b3-6be4-4709-a92e-207f039bdb58.png)
Reason analyze (If you can)
I'm not sure what the mistake was.
This is correct in version 5.1.2. However, this is incorrect in version 5.2.0.
The text was updated successfully, but these errors were encountered: