table: Get rid of table::run_compaction helper
The table::run_compaction is a trivial wrapper for
table::compact_sstables.
We have lots of similar {start, trigger, run}_compaction functions.
Dropping the run_compaction wrapper to reduce confusion.
Closes #9161
This commit is contained in:
@@ -595,7 +595,7 @@ void compaction_manager::submit(column_family* cf) {
|
||||
_stats.pending_tasks--;
|
||||
_stats.active_tasks++;
|
||||
task->compaction_running = true;
|
||||
return cf.run_compaction(std::move(descriptor)).then_wrapped([this, task, compacting = std::move(compacting), weight_r = std::move(weight_r)] (future<> f) mutable {
|
||||
return cf.compact_sstables(std::move(descriptor)).then_wrapped([this, task, compacting = std::move(compacting), weight_r = std::move(weight_r)] (future<> f) mutable {
|
||||
_stats.active_tasks--;
|
||||
task->compaction_running = false;
|
||||
|
||||
@@ -724,7 +724,7 @@ future<> compaction_manager::rewrite_sstables(column_family* cf, sstables::compa
|
||||
compaction_backlog_tracker user_initiated(std::make_unique<user_initiated_backlog_tracker>(_compaction_controller.backlog_of_shares(200), _available_memory));
|
||||
return do_with(std::move(user_initiated), [this, &cf, descriptor = std::move(descriptor)] (compaction_backlog_tracker& bt) mutable {
|
||||
return with_scheduling_group(_maintenance_sg.cpu, [this, &cf, descriptor = std::move(descriptor)]() mutable {
|
||||
return cf.run_compaction(std::move(descriptor));
|
||||
return cf.compact_sstables(std::move(descriptor));
|
||||
});
|
||||
});
|
||||
}).then_wrapped([this, task, compacting] (future<> f) mutable {
|
||||
|
||||
@@ -881,7 +881,6 @@ public:
|
||||
void start_compaction();
|
||||
void trigger_compaction();
|
||||
void try_trigger_compaction() noexcept;
|
||||
future<> run_compaction(sstables::compaction_descriptor descriptor);
|
||||
void trigger_offstrategy_compaction();
|
||||
future<> run_offstrategy_compaction();
|
||||
void set_compaction_strategy(sstables::compaction_strategy_type strategy);
|
||||
|
||||
4
table.cc
4
table.cc
@@ -951,10 +951,6 @@ void table::do_trigger_compaction() {
|
||||
}
|
||||
}
|
||||
|
||||
future<> table::run_compaction(sstables::compaction_descriptor descriptor) {
|
||||
return compact_sstables(std::move(descriptor));
|
||||
}
|
||||
|
||||
void table::trigger_offstrategy_compaction() {
|
||||
// If the user calls trigger_offstrategy_compaction() to trigger
|
||||
// off-strategy explicitly, cancel the timeout based automatic trigger.
|
||||
|
||||
Reference in New Issue
Block a user