diff --git a/replica/distributed_loader.cc b/replica/distributed_loader.cc index 7b18e545c7..c46e259fd6 100644 --- a/replica/distributed_loader.cc +++ b/replica/distributed_loader.cc @@ -172,15 +172,12 @@ distributed_loader::make_sstables_available(sstables::sstable_directory& dir, sh future<> distributed_loader::process_upload_dir(distributed& db, sharded& vb, sstring ks, sstring cf) { - seastar::thread_attributes attr; - attr.sched_group = db.local().get_streaming_scheduling_group(); - const auto& rs = db.local().find_keyspace(ks).get_replication_strategy(); if (rs.is_per_table()) { on_internal_error(dblog, "process_upload_dir is not supported with tablets"); } - return seastar::async(std::move(attr), [&db, &vb, ks = std::move(ks), cf = std::move(cf)] { + return seastar::async([&db, &vb, ks = std::move(ks), cf = std::move(cf)] { auto global_table = get_table_on_all_shards(db, ks, cf).get(); sharded directory; diff --git a/sstables_loader.cc b/sstables_loader.cc index d719231688..89ee2dab2b 100644 --- a/sstables_loader.cc +++ b/sstables_loader.cc @@ -8,6 +8,7 @@ #include #include +#include #include #include #include "sstables_loader.hh" @@ -407,6 +408,8 @@ future<> sstables_loader::load_new_sstables(sstring ks_name, sstring cf_name, _loading_new_sstables = true; } + co_await coroutine::switch_to(_sched_group); + sstring load_and_stream_desc = fmt::format("{}", load_and_stream); const auto& rs = _db.local().find_keyspace(ks_name).get_replication_strategy(); if (rs.is_per_table() && !load_and_stream) {