Skip to content

Fix compactor thread and metrics leak in RocksDBKVSpace - #320

Open
pallavithegod wants to merge 1 commit into
apache:mainfrom
pallavithegod:fix-rocksdb-compactor-leak-290
Open

pallavithegod wants to merge 1 commit into
apache:mainfrom
pallavithegod:fix-rocksdb-compactor-leak-290

Conversation

@pallavithegod

Copy link
Copy Markdown

Summary

Each KV space created its own compactionExecutor but doClose/doDestroy never shut it down. Non-daemon threads accumulated on split/merge and blocked JVM exit.

Fix

  • shutdownNow the executor in doClose and doDestroy.
  • Remove the nine kvspace.executor meters registered by ExecutorServiceMetrics.monitor, scoped by space tags.

Fixes #290

Verification

  • base-kv-local-engine-rocksdb compiles: BUILD SUCCESS.

Shut down per-space compactionExecutor in doClose and doDestroy,
and remove its ExecutorServiceMetrics meters. Previously each
range leaked a non-daemon thread, blocking JVM exit and growing
without bound on split/merge.

Fixes apache#290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Per-KV-space RocksDB compaction executor is never shut down: non-daemon threads accumulate and prevent JVM exit

1 participant