-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
Labels
Description
Description
The Hive connector in Presto currently exposes caching controls primarily via MetastoreCacheScope, which enables or disables groups of caches together.
While this approach is simple, it has become increasingly limiting as Presto is used across heterogeneous table formats and workloads (Hive, Iceberg, Delta, etc.).
Specifically:
- Some metastore caches are safe and beneficial for certain formats
- Others can be incorrect or undesirable (e.g., for Iceberg metadata evolution, ACID)
- Users currently cannot selectively enable/disable individual caches without turning off caching broadly
This forces users to choose between performance and correctness, even when only a subset of caches is problematic.
Motivation
-
Selective cache disabling
-
Per-cache TTL / refresh behavior: Different metastore entities have different stability characteristics.
Proposed Approach
Introduce a per-cache configuration model that allows:
- Explicit enable/disable of individual metastore caches
- Optional per-cache TTL / refresh configuration
- Backward compatibility with existing configs
Backward Compatibility
If no per-cache configuration is provided:
- Existing MetastoreCacheScope behavior remains unchanged
- Defaults match current behavior
Reactions are currently unavailable