compaction_manager: fix assertion when stopping task

Task is stopped by closing gate and forcing it to exit via gate
exception. The problem is that task->compacting_cf may be set to
the column family being compacted, and compaction_manager::remove
would see it and try to stop the same task again, which would
lead to problems. The fix is to clean task->compacting_cf when
stopping task.

Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
Message-Id: <3473e93c1a107a619322769d65fa020529b5501b.1454441286.git.raphaelsc@scylladb.com>
This commit is contained in:
Raphael S. Carvalho
2016-02-02 17:28:12 -02:00
committed by Pekka Enberg
parent c67538009c
commit cf22c827f9

View File

@@ -132,6 +132,7 @@ void compaction_manager::task_start(lw_shared_ptr<compaction_manager::task>& tas
try {
f.get();
} catch (seastar::gate_closed_exception& e) {
task->compacting_cf = nullptr;
cmlog.info("compaction task handler stopped due to shutdown");
throw;
} catch (std::exception& e) {