-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager#createConnections leaks connection if replay throws exception #34418
Comments
Could you submit a pull request to fix it? |
|
@terrymanu @linghengqian Sorry for being too busy to reply, I am unable to push code to github due to the security policy of my company. I believe #34463 didn't fix this issue because it didn't change code of |
@Nick-The-Uncharted Can you share a git with minimal reproducible unit tests? I'm surprised that the handling of #34463 didn't fix this issue. |
|
@linghengqian Sorry for misreading the code, the change in #34463 do fixed my problem, but |
|
Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:
org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager#createConnections(java.lang.String, java.lang.String, javax.sql.DataSource, int, org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode)
leaks connection if replay throws exception.Thread stack:
Which version of ShardingSphere did you use?
5.5.0
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
Connection is closed even some exception throwed during replay.
Actual behavior
Connection is never closed when some exception throwed during replay.
Reason analyze (If you can)
org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager#createConnections(java.lang.String, java.lang.String, javax.sql.DataSource, int, org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode)
didn't handle exception while callingreplay
method.Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Example codes for reproduce this issue (such as a github link).
The text was updated successfully, but these errors were encountered: