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); }));