Skip to content

Hive Metastore: Allow fine-grained enable/disable and per-cache configuration for metastore caches #26917

@imjalpreet

Description

@imjalpreet

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

  1. Selective cache disabling

  2. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions