From cf22c827f9be4d7759c0498ba83fe01ea46f164e Mon Sep 17 00:00:00 2001 From: "Raphael S. Carvalho" Date: Tue, 2 Feb 2016 17:28:12 -0200 Subject: [PATCH] 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 Message-Id: <3473e93c1a107a619322769d65fa020529b5501b.1454441286.git.raphaelsc@scylladb.com> --- sstables/compaction_manager.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sstables/compaction_manager.cc b/sstables/compaction_manager.cc index ae3b22931a..4c279c990e 100644 --- a/sstables/compaction_manager.cc +++ b/sstables/compaction_manager.cc @@ -132,6 +132,7 @@ void compaction_manager::task_start(lw_shared_ptr& 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) {