You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Catalog loader cannot pass a Runtime to the catalog it builds #3285
Is your feature request related to a problem or challenge?
CatalogBuilder::with_runtime lets a caller choose the runtime a catalog, and the tables it creates, spawn their work on (scan planning, delete file processing). A catalog built through iceberg-catalog-loader cannot be given one: BoxedCatalogBuilder forwards with_storage_factory and with_kms_client_factory to the underlying CatalogBuilder, but has no with_runtime.
So a catalog chosen by type at runtime (iceberg_catalog_loader::load("rest")) always uses the runtime current when it is built, since the builders fall back to Runtime::current(). An application that keeps Iceberg work on a dedicated runtime, for example so that catalog clients and cached tables outlive the runtime of the request that built them, has to either build every catalog inside that runtime or give up the loader and match on catalog types itself.
Describe the solution you'd like
Add with_runtime to BoxedCatalogBuilder, forwarding to CatalogBuilder::with_runtime the same way the other two methods are forwarded:
let catalog = iceberg_catalog_loader::load("rest")?
.with_runtime(runtime).load("rest".to_string(), props).await?;
This mirrors how with_kms_client_factory was added to the loader in #2650. Every builder in the loader's registry already implements CatalogBuilder::with_runtime, so nothing else changes.
Activity