-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
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 call
catalogManager.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.