thswlsqls opened a new pull request, #17233: URL: https://github.com/apache/iceberg/pull/17233
Closes #17232 ## Summary - `RESTCatalogServer.stop()` only stopped the Jetty `httpServer`; the backend `Catalog` from `initializeBackendCatalog()` (a `Closeable` `JdbcCatalog` by default) was never closed, leaking its JDBC connection pool and `FileIO`. - `RESTServerExtension` registers `RESTCatalogServer` as a class-level JUnit fixture (RCK suite, Spark 3.5/4.0/4.1 `TestBaseWithCatalog`), so the leak accumulated per test class. - `stop()` now closes the backend catalog when `Closeable` — the "owner closes the backend" contract from `RESTCatalogAdapter.close()`, via the `instanceof Closeable` pattern in `ParallelIterable`. ## Testing done - Added `TestRESTCatalogServer#stopClosesBackendCatalog`: starts a server on the default in-memory sqlite `JdbcCatalog`, stops it, and asserts the connection pool rejects further use (fails without the fix). - `./gradlew :iceberg-open-api:check` — 1 test passed. - Not a REVAPI module (no `src/main`); no public API change. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
