diff --git a/compaction/compaction_manager.cc b/compaction/compaction_manager.cc index a7477421e6..4415ed528c 100644 --- a/compaction/compaction_manager.cc +++ b/compaction/compaction_manager.cc @@ -810,7 +810,8 @@ future<> compaction_manager::rewrite_sstables(replica::table* t, sstables::compa auto sstable_level = sst->get_sstable_level(); auto run_identifier = sst->run_identifier(); auto sstable_set_snapshot = can_purge ? std::make_optional(t.get_sstable_set()) : std::nullopt; - auto descriptor = sstables::compaction_descriptor({ sst }, std::move(sstable_set_snapshot), _maintenance_sg.io, + // FIXME: this compaction should run with maintenance priority. + auto descriptor = sstables::compaction_descriptor({ sst }, std::move(sstable_set_snapshot), service::get_local_compaction_priority(), sstable_level, sstables::compaction_descriptor::default_max_sstable_bytes, run_identifier, options); // Releases reference to cleaned sstable such that respective used disk space can be freed. @@ -852,7 +853,7 @@ future<> compaction_manager::rewrite_sstables(replica::table* t, sstables::compa }; compaction_backlog_tracker user_initiated(std::make_unique(_compaction_controller.backlog_of_shares(200), _available_memory)); - completed = co_await with_scheduling_group(_maintenance_sg.cpu, std::ref(perform_rewrite)); + completed = co_await with_scheduling_group(_compaction_controller.sg(), std::ref(perform_rewrite)); } while (!completed); };