Files
scylladb/compaction
Patryk Jędrzejczak bbde5a64b2 compaction_manager: unregister compaction module on early shutdown
The compaction module is registered with task_manager in the compaction_manager
constructor, and unregistered in compaction_manager::really_do_stop(), which
was gated behind `_state != state::none` in compaction_manager::do_stop().
Since enable() -- which transitions _state from none to running -- is called
later during startup (from database::start() or the disk space monitor callback)
than the compaction_manager constructor, an early shutdown could leave the
compaction module registered after compaction_manager::do_stop() returned.
task_manager::stop() then aborted with 'Tried to stop task manager while
some modules were not unregistered'.

Fix compaction_manager::do_stop() to call _task_manager_module->stop() even
when `_state == state::none`, so that the compaction module is always properly
unregistered.

Fixes: SCYLLADB-2226
(cherry picked from commit 6cde390e21)
2026-05-25 17:59:16 +00:00
..
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00