mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 19:35:12 +00:00
For stopping a task of compaction manager, we first close the gate used by compaction then bust semaphore via semaphore::broken(). The problem is that semaphore::broken() only signals waiters, and so subsequent semaphore::wait() calls would succeed and the task would remain alive forever. The fix is to signal semaphore, forcing the task to exit via gate exception, so we will no longer rely on semaphore::broken() for finishing the task. That's possible because we try to access the gate right after we waited on semaphore. Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
5.9 KiB
5.9 KiB