mengw15 opened a new issue, #7290: URL: https://github.com/apache/texera/issues/7290
### Task Summary Part of #6870, follow-up to #6929. With the per-warehouse catalog in place, `IcebergCatalogInstance` keeps one catalog client per warehouse name for the life of the process — no cap, no TTL, no `close()` — so a long-lived web/CU JVM accumulates a `RESTCatalog` (and its connection pool) per warehouse it ever touches. - **Bounded cache** — replace the map with a Guava cache (`maximumSize` + `expireAfterAccess` + a removal listener that closes the evicted catalog). Guava's `CacheBuilder` is already used for bounded caches in `HuggingFaceModelResource`. - **Callers resolve per use** — for eviction to be safe, callers must stop holding a catalog across an execution: `IcebergTableWriter` takes it as a constructor field and `IcebergDocument` as a `lazy val`; both should resolve it per use. This is also what keeps a long execution's vended credentials fresh (#6870, credential-lifetime section). - **Drop the global lock** — the per-use lookup rides alongside operations that are already REST round trips, and removes the global `synchronized` that holds one JVM-wide lock across the `GET /v1/config` of a cache miss. ### Task Type - [x] Other (feature implementation) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
