From: aaron-congo (@aaron-congo) <noreply+aaron-congo@github.com>
To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>
Subject: Re: [aws/aws-advanced-jdbc-wrapper] PR #2237: feat: add efm3 host monitoring plugin with per-connection registration
Date: Wed, 18 Nov 2026 22:09:31 +0000
Message-ID: <gh-aws-aws-advanced-jdbc-wrapper-2237-rc4621536981@github.com> (raw)
In-Reply-To: <gh-aws-aws-advanced-jdbc-wrapper-2237@github.com>
References: <gh-aws-aws-advanced-jdbc-wrapper-2237@github.com>
(on wrapper/src/main/java/software/amazon/jdbc/plugin/efm/v3/HostMonitorV3Impl.java)
`ABORT_EXECUTOR` is one static, unbounded cached thread pool shared by every host, and nothing shuts it down in `Driver.releaseResources()`.
- Thread burst: `connection.abort(executor)` hands the close work to the executor. During a writer outage with 2,000 in-flight connections, `abortConnections` submits 2,000 aborts in one pass, and the cached pool can start up to 2,000 threads at once. efm2 used one abort thread per monitor.
- Lifecycle: a static executor that `Driver.releaseResources()` doesn't shut down keeps its threads alive after shutdown (up to the cached pool's keep-alive)
Should this be a bounded pool (for example a fixed pool, or a cached pool with a cap), with a shutdown hooked into `releaseResources()`?