Clear prepared statement handle before reconnect#2364
Clear prepared statement handle before reconnect#2364lilgreenbird merged 4 commits intomicrosoft:mainfrom
Conversation
@microsoft-github-policy-service agree company="Raiffeisen Software GmbH" |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2364 +/- ##
============================================
+ Coverage 50.03% 50.13% +0.09%
- Complexity 3804 3828 +24
============================================
Files 145 145
Lines 33304 33360 +56
Branches 5641 5655 +14
============================================
+ Hits 16665 16726 +61
+ Misses 14248 14242 -6
- Partials 2391 2392 +1 ☔ View full report in Codecov by Sentry. |
|
thank you for submitting this I have marked this for review |
| private void clearPrepStmtHandle(){ | ||
| prepStmtHandle = 0; | ||
| cachedPreparedStatementHandle = null; | ||
| if(getStatementLogger().isLoggable(Level.FINER)){ |
There was a problem hiding this comment.
Minor formatting issue. Should have a space preceeding the initila if statement brace and after the closing brace
There was a problem hiding this comment.
| if(getStatementLogger().isLoggable(Level.FINER)){ | |
| if (getStatementLogger().isLoggable(Level.FINER)){ |
There was a problem hiding this comment.
pls run formatter on all files
|
ignore failing pipelines it's an issue in our test lab |
| private void clearPrepStmtHandle(){ | ||
| prepStmtHandle = 0; | ||
| cachedPreparedStatementHandle = null; | ||
| if(getStatementLogger().isLoggable(Level.FINER)){ |
There was a problem hiding this comment.
| if(getStatementLogger().isLoggable(Level.FINER)){ | |
| if (getStatementLogger().isLoggable(Level.FINER)){ |
aee03c1
…QLServer docker image tag to `2022-CU14-ubuntu-22.04` ### What changes were proposed in this pull request? This PR aims to upgrade `mssql-jdbc` to 12.8.0.jre11 and MySQLServer docker image to `mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04`. ### Why are the changes needed? This is the latest stable version of `mssql-jdbc`, related release notes: https://github.com/microsoft/mssql-jdbc/releases/tag/v12.7.0 https://github.com/microsoft/mssql-jdbc/releases/tag/v12.7.1 https://github.com/microsoft/mssql-jdbc/releases/tag/v12.8.0 Some fixed issues: - Fix to ensure metadata returned follows JDBC data type specs microsoft/mssql-jdbc#2326 - Added token cache map to fix use of unintended auth token for subsequent connections microsoft/mssql-jdbc#2341 - Clear prepared statement handle before reconnect microsoft/mssql-jdbc#2364 - Reset socketTimeout to original value after a successful connection open microsoft/mssql-jdbc#2355 - Clear prepared statement cache when resetting statement pool connection microsoft/mssql-jdbc#2361 - Fixed ClassLoader leak of ActivityCorrelator ThreadLocal microsoft/mssql-jdbc#2366 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47569 from wayneguow/ms_12_8. Authored-by: Wei Guo <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
|
Hi @Jeffery-Wasty , We see the issue (2362) occurring intermittently in 12.4.2.jre11 version. Please let us if this fix is available in 12.8.1.jre11? |
|
Hi @kadirchisty, The fix is available in the latest stable version 12.8.1. |
This fix clears the SQLServerPreparedStatement.prepStmtHandle before reconnecting.
The provided interface can also be used for other objects that need to handle reconnecting.
One test fails: PropertyTest.testRetryCount:54->testInvalidPropertyOverBrokenConnection:46 Unexpected error message occurred!Eine bestehende Verbindung wurde softwaregesteuert
durch den Hostcomputer abgebrochen
This might be due to the system being German. The test also failed before the fix.