From b7e72b3167a7cedfb73db73d95417ca4c6a94e09 Mon Sep 17 00:00:00 2001 From: Lakshmi Narayanan Sreethar Date: Thu, 3 Apr 2025 18:06:53 +0530 Subject: [PATCH] replica/table::do_apply : do not check for async gate's closure The `table::do_apply()` method verifies if the compaction group's async gate is open to determine if the compaction group is active. Closing this async gate prevents any new operations but waits for existing holders to exit, allowing their operations to complete. When holding a gate, holders will observe the gate as closed when it is being closed, but this is irrelevant as they are already inside the gate and are allowed to complete. All the callers of `table::do_apply()` already enter the gate before calling the method. So, the async gate check inside `table::do_apply()` will erroneously throw an exception when the compaction group is closing despite holding the gate. This commit removes the check to prevent this from happening. Fixes #23348 Signed-off-by: Lakshmi Narayanan Sreethar Closes scylladb/scylladb#23579 (cherry picked from commit 750f4baf44c2a4b7f17414e9db27628f1d5c8158) Closes scylladb/scylladb#23645 --- replica/table.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/replica/table.cc b/replica/table.cc index c155d5f0ec..1afd9afc80 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -3424,10 +3424,6 @@ db::replay_position table::set_low_replay_position_mark() { template void table::do_apply(compaction_group& cg, db::rp_handle&& h, Args&&... args) { - if (cg.async_gate().is_closed()) [[unlikely]] { - on_internal_error(tlogger, "async_gate of table's compaction group is closed"); - } - utils::latency_counter lc; _stats.writes.set_latency(lc); db::replay_position rp = h;