osscm opened a new pull request, #15492:
URL: https://github.com/apache/iceberg/pull/15492
## Problem
ThreadPools.newExitingWorkerPool and newExitingScheduledPool use Guava's
MoreExecutors.getExitingExecutorService() which registers a new JVM
shutdown
hook on every call. These hooks are never removed, even when the pool is
explicitly shut down. In long-running services like Spark, Trino, and
Flink,
where REST catalogs and AuthSessionCache instances are created and closed
repeatedly, this causes unbounded accumulation of shutdown hooks.
Fixes #15031
## Solution
Introduce ManagedThreadPools to centralize thread pool lifecycle
management:
- Single shutdown hook registered once, replacing per-pool Guava hooks
- Per-pool terminationTimeout preserved for graceful shutdown
- AuthSessionCache.close() calls ManagedThreadPools.remove() to deregister
explicitly closed pools
- Static WORKER_POOL and DELETE_WORKER_POOL structurally untouched
--
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]