From 00a819bcd8f8e543d52fc47481428a1e4d982dc8 Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Mon, 2 Mar 2026 14:39:23 +0200 Subject: [PATCH] cql3: remove unnecessary assert() In cql3/, there was one call to assert() (not SCYLLA_ASSERT or throwing_assert), and it was: const auto shard_num = smp::count; assert(shard_num > 0) Rather than converting this assert() to throwing_assert() as I did in previous patches, I decided to outright remove it: Seastar guarantees that smp::count is not zero. Many other places in the code use smp::count assuming that it is correct, no other place bothers to assert it isn't zero. Signed-off-by: Nadav Har'El --- cql3/statements/modification_statement.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/cql3/statements/modification_statement.cc b/cql3/statements/modification_statement.cc index 4080f9a1b7..6db7f22807 100644 --- a/cql3/statements/modification_statement.cc +++ b/cql3/statements/modification_statement.cc @@ -371,7 +371,6 @@ process_forced_rebounce(unsigned shard, query_processor& qp, const query_options // On the last iteration, re-bounce to the correct shard. if (counter != 0) { const auto shard_num = smp::count; - assert(shard_num > 0); const auto local_shard = this_shard_id(); auto target_shard = local_shard + 1; if (target_shard == shard) {