-
Notifications
You must be signed in to change notification settings - Fork 2.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
Allow caching stats in JDBC but not metadata #19859
Commits on Nov 22, 2023
-
- static fields before instance fields - private where appropriate - remove special values - fix code indentation - use explicit `Duration` constructor instead of approximating `Duration.succinctDuration`
Configuration menu - View commit details
-
Copy full SHA for 3fd0684 - Browse repository at this point
Copy the full SHA 3fd0684View commit details -
Remove CachingJdbcClient overload
Inline in usages to simplify CachingJdbcClient construction.
Configuration menu - View commit details
-
Copy full SHA for ddf7e7b - Browse repository at this point
Copy the full SHA ddf7e7bView commit details -
By default test defaults in TestCachingJdbcClient
Previously the test used cacheMissing=true by default, despite this being false by default in the config.
Configuration menu - View commit details
-
Copy full SHA for ef4a13f - Browse repository at this point
Copy the full SHA ef4a13fView commit details -
Construct CachingJdbcClient using builder and config in test
Using builder avoids maintaining overloads of various "create some CachingJdbcClient" methods. Using config avoids passing 3 Duration parameters positionally to the constructor. The config is equivalent of named parameters. This also moves helper methods below tests. This is code cleanup and preparatory change before adding yet another Duration parameter.
Configuration menu - View commit details
-
Copy full SHA for 72086b4 - Browse repository at this point
Copy the full SHA 72086b4View commit details -
Remove default CachingJdbcClient in test
Many TestCachingJdbcClient's tests construct their own instance, so providing a default instance in the `@Before` creates duplicated state and confusion.
Configuration menu - View commit details
-
Copy full SHA for f81446a - Browse repository at this point
Copy the full SHA f81446aView commit details -
Remove unnecessary logic from CachingJdbcClient
This logically reverts commit b25c90b. The class uses `EvictableCacheBuilder` and the `io.trino.cache.EvictableCacheBuilder#cacheDisabled` considers the cache to be disabled when TTL is 0 or cache size is 0, so no need to set cache size to 0 if TTL is known to be 0.
Configuration menu - View commit details
-
Copy full SHA for 62e2619 - Browse repository at this point
Copy the full SHA 62e2619View commit details -
Allow caching stats in JDBC but not metadata
Apply `CachingHiveMetastore` capabilities in JDBC. Allow turning on statistics caching without having to use caching for all of the metadata. In common case caching statistics has much fewer side effects than caching other stuff.
Configuration menu - View commit details
-
Copy full SHA for 2da922e - Browse repository at this point
Copy the full SHA 2da922eView commit details -
Make testSpecificSchemaAndTableCaches faster
The test used a masked Thread.sleep to await for cache expiration, and thus lasted at least 6 seconds. Now the whole test class runs about 1 second.
Configuration menu - View commit details
-
Copy full SHA for a212756 - Browse repository at this point
Copy the full SHA a212756View commit details