-
Notifications
You must be signed in to change notification settings - Fork 437
Invalidate existing enclave session during connection (re)connect #2638
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2638 +/- ##
============================================
+ Coverage 51.63% 51.64% +0.01%
+ Complexity 4014 4008 -6
============================================
Files 147 147
Lines 33762 33772 +10
Branches 5641 5644 +3
============================================
+ Hits 17432 17442 +10
+ Misses 13893 13869 -24
- Partials 2437 2461 +24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
need to add test
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.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.
No blockers. One small white space nit and if we can de-dup the code block, that'd be great. Approved with or without the changes.
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerException.java
Outdated
Show resolved
Hide resolved
) * Invalidate existing enclave session in during (re)connect * Added check on logging level * Added a speculative fix to invalidate enclaveCache on error 33195 * Moved error checking in PreparedStatement doExecute methods * Added trade for invalidation * Directly call invalidateEnclaveSessionCache from reconnect
) * Invalidate existing enclave session in during (re)connect * Added check on logging level * Added a speculative fix to invalidate enclaveCache on error 33195 * Moved error checking in PreparedStatement doExecute methods * Added trade for invalidation * Directly call invalidateEnclaveSessionCache from reconnect
) (#2680) * Invalidate existing enclave session in during (re)connect * Added check on logging level * Added a speculative fix to invalidate enclaveCache on error 33195 * Moved error checking in PreparedStatement doExecute methods * Added trade for invalidation * Directly call invalidateEnclaveSessionCache from reconnect Co-authored-by: Mahendra Chavan <machavan@microsoft.com>
Description:
For AE with secure enclave, the driver connections receives an error 33195 - Internal enclave error. Enclave was provided with an invalid session handle. For more information, contact Customer Support Services, post failovers ( in case of Always On setup).
This could be happening because of driver using existing enclave session from the enclaveCache in the driver.
This fix invalidates the existing enclave session as part of the connect method.