opentracing-contrib / java-jdbc

OpenTracing Instrumentation for JDBC
Apache License 2.0
82 stars 56 forks source link

Fixing leak of prepared statements in prepareCall(String sql) #117

Closed naveedyahyazadeh closed 3 years ago

naveedyahyazadeh commented 3 years ago

The current implementation of prepareCall(String sql) leaks prepared statements, as we make two calls to connection.prepareCall(sql)

https://github.com/opentracing-contrib/java-jdbc/blob/ecd42903149c88fb8e735376718e1e8a60cd5a4a/src/main/java/io/opentracing/contrib/jdbc/TracingConnection.java#L125-L131

This PR contains a simple one-line fix for this.

matthiaslee commented 3 years ago

We just built the latest jar and validated manually, this definitely fixes the leaking prepared statements we encountered.

matthiaslee commented 3 years ago

FYI @malafeev

matthiaslee commented 3 years ago

Thanks for the quick merge @malafeev, can you also release a new version tag?

pwlawe commented 3 years ago

@malafeev It would be great to get this released as soon as feasible!

mehta-ankit commented 3 years ago

Any update on when this can be released @malafeev ?? It would be great if this can be released soon , please

malafeev commented 3 years ago

I'm not involved in java-jdbc anymore. @carlosalberto @tedsuo please provide status of the repository, who takes ownership?