From 8e8dc2c930f5541531c3326127f012e7bc6292ef Mon Sep 17 00:00:00 2001 From: Eliran Sinvani Date: Thu, 12 May 2022 14:10:56 +0300 Subject: [PATCH] Revert "table: disable_auto_compaction: stop ongoing compactions" This reverts commit 4affa801a5ea1994e226d3e7581f3f38506dcc22. In issue #10146 a write throughput drop of ~50% was reported, after bisect it was found that the change that caused it was adding some code to the table::disable_auto_compaction which stops ongoing compactions and returning a future that resolves once all the compaction tasks for a table, if any, were terminated. It turns out that this function is used only at startup (and in REST api calls which are not used in the test) in the distributed loader just before resharding and loading of the sstable data. It is then reanabled after the resharding and loading is done. For still unknown reason, adding the extra logic of stopping ongoing compactions made the write throughput drop to 50%. Strangely enough this extra logic **should** (still unvalidated) not have any side effects since no compactions for a table are supposed to be running prior to loading it. This regains the performance but also undo a change which eventually should get in once we find the actual culprit. Signed-off-by: Eliran Sinvani Closes #10559 Reopens #9313. --- replica/table.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/replica/table.cc b/replica/table.cc index 4e7fffa5b8..147a36fb10 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -2170,7 +2170,7 @@ std::chrono::milliseconds table::get_coordinator_read_latency_percentile(double void table::enable_auto_compaction() { - // FIXME: unmute backlog. turn table backlog back on. + // XXX: unmute backlog. turn table backlog back on. // see table::disable_auto_compaction() notes. _compaction_disabled_by_user = false; trigger_compaction(); @@ -2178,7 +2178,7 @@ table::enable_auto_compaction() { future<> table::disable_auto_compaction() { - // FIXME: mute backlog. When we disable background compactions + // XXX: mute backlog. When we disable background compactions // for the table, we must also disable current backlog of the // table compaction strategy that contributes to the scheduling // group resources prioritization. @@ -2205,9 +2205,8 @@ table::disable_auto_compaction() { // - it will break computation of major compaction descriptor // for new submissions _compaction_disabled_by_user = true; - return with_gate(_async_gate, [this] { - return compaction_manager().stop_ongoing_compactions("disable auto-compaction", this, sstables::compaction_type::Compaction); - }); + // FIXME: stop ongoing compactions + return make_ready_future<>(); } flat_mutation_reader_v2