-
Notifications
You must be signed in to change notification settings - Fork 426
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
Cache Parameter Metadata #1845
Cache Parameter Metadata #1845
Conversation
…ft/mssql-jdbc into cache-parameter-metadata
src/test/java/com/microsoft/sqlserver/jdbc/parametermetadata/ParameterMetaDataCacheTest.java
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
src/test/java/com/microsoft/sqlserver/jdbc/parametermetadata/ParameterMetaDataCacheTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/microsoft/sqlserver/jdbc/parametermetadata/ParameterMetaDataCacheTest.java
Outdated
Show resolved
Hide resolved
…p to ConcurrentHashMap
…r on test setup method.
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerEnclaveProvider.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
* @return true, if the metadata for the query can be retrieved | ||
* | ||
*/ | ||
static boolean getQueryMetadata(Parameter[] params, ArrayList<String> parameterNames, |
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.
we don't need all these static methods this takes up memory. The caller should create an instance of the cache and invoke the methods
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLQueryMetadataCache.java
Outdated
Show resolved
Hide resolved
… alongside the error code.
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.
LGTM
…s problems, test will still correctly assess the error code path in ParameterMetaDataCache
345ef9f
@Jeffery-Wasty this is an exciting change! Thank you for working on it!
|
Hi @alex-bochkov, We'll be releasing documentation regarding new features shortly, in the meantime I can answer the questions you have included: 1. What's the cache TTL? The cache doesn't have an independent TTL, rather the enclave session it belongs to has a TTL of eight hours. 2. Is it possible to disable cache if needed? For example, if we need to make schema changes and make sure the app won't break in the middle. It's not possible to disable the cache at the moment. This is something we can potentially add a later time, however current efforts are towards extending caching for secure enclave scenarios. |
Cache sp_describe_parameter_encryption calls to improved performance by reducing trips to the server. For now, supports AE without secure enclaves, with enclave support (v3) to be added in a later update.