Shut down KV space compaction executors - #293
efegokdemir wants to merge 1 commit into
Conversation
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
|
Fix verified independently against the compiled classes during the investigation behind #290 — after close() the surviving non-daemon thread was uniquely the compactor, and the probe process refused to exit until killed; with the executor shut down the process exits cleanly. The thread-leak half of #290 is fully addressed. One scope note for the record (does not block this PR): ExecutorServiceMetrics.monitor registers nine meters per KV space (kvspace.executor, .active, .queued, .pool.size, .pool.core, .pool.max, .completed, .idle, .queue.remaining), and those were also never removed — see the Metric registration section of #290. This PR captures the meter ids at construction via a global-registry scan, which grabs them correctly today; a future micrometer version exposing a proper handle for the monitor would make this cleaner. The thread leak (the OOM driver) is the part that matters and is fixed here. |
Summary
Testing
./mvnw -pl testsuites -am -DskipTests install— passed with Java 21../mvnw -pl base-kv/base-kv-local-engine-rocksdb -am -Dtest=RocksDBCPableKVEngineTest -DfailIfNoTests=false test— passed with Java 21 (19 tests).git diff --check— passed.Fixes #290