From 0d2178202ded16543de5e7ab762f271bba39720d Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 17 Apr 2024 15:36:51 +0300 Subject: [PATCH] table: Use smp::all_cpus() to iterate over all CPUs locally Currently it uses irange(0, smp::count0), but seastar provides convenient helper call for the very same range object. Signed-off-by: Pavel Emelyanov --- replica/table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replica/table.cc b/replica/table.cc index e26831a793..8daae7b9c9 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -2286,7 +2286,7 @@ future<> table::snapshot_on_all_shards(sharded& sharded_db, const glob std::vector file_sets; file_sets.reserve(smp::count); - co_await coroutine::parallel_for_each(boost::irange(0u, smp::count), [&] (unsigned shard) -> future<> { + co_await coroutine::parallel_for_each(smp::all_cpus(), [&] (unsigned shard) -> future<> { file_sets.emplace_back(co_await smp::submit_to(shard, [&] { return table_shards->take_snapshot(sharded_db.local(), jsondir); }));