Skip to content

Add catalog refresh capability to enable external catalog store synchronization #26760

@NingGUO520

Description

@NingGUO520

We have a use case where our catalogs are managed through external systems, and we would greatly appreciate the ability to have Trino automatically reflect those changes at runtime.

Proposed Enhancement
We'd like to contribute an enhancement that adds a refreshCatalogsFromStore() method to CoordinatorDynamicCatalogManager to allow reconciliation of the current catalog state with the configured CatalogStore.
And add a setCatalogManager(CatalogManager catalogManager) method to the CatalogStore interface to provide stores with a callback mechanism to the manager.

How it would work:

  • Custom CatalogStore implementations could implement their own change detection logic (polling, webhooks, etc.)
  • When changes are detected, the store would callcatalogManager.refreshCatalogsFromStore()via the injected reference
  • The manager reconciles the current state with the desired state from the store
  • Custom CatalogStore could enforce read-only behavior to prevent conflicts

Alternative Considered
We considered making the entire CatalogManager pluggable (as discussed in #23403), but that would be a much larger architectural change. This approach achieves the similar goal with minimal core modifications. We'd appreciate any feedback or guidance on whether this direction might align with the project's vision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions