From e1ba285d5236048edff48155d8883ec95f96afcd Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Thu, 19 May 2022 13:15:54 +0300 Subject: [PATCH] replica: distributed_loader: reindent run_resharding_jobs Signed-off-by: Benny Halevy --- replica/distributed_loader.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/replica/distributed_loader.cc b/replica/distributed_loader.cc index 46e13794ee..1b27ff968b 100644 --- a/replica/distributed_loader.cc +++ b/replica/distributed_loader.cc @@ -189,21 +189,21 @@ future<> run_resharding_jobs(sharded& dir, std::vec co_return; } - // FIXME: indentation - auto start = std::chrono::steady_clock::now(); - dblog.info("{}", fmt::format("Resharding {} for {}.{}", sstables::pretty_printed_data_size(total_size), ks_name, table_name)); + auto start = std::chrono::steady_clock::now(); + dblog.info("{}", fmt::format("Resharding {} for {}.{}", sstables::pretty_printed_data_size(total_size), ks_name, table_name)); - co_await dir.invoke_on_all([&] (sstables::sstable_directory& d) -> future<> { - auto& table = db.local().find_column_family(ks_name, table_name); - auto info_vec = std::move(reshard_jobs[this_shard_id()].info_vec); - auto& cm = db.local().get_compaction_manager(); - auto max_threshold = table.schema()->max_compaction_threshold(); - auto& iop = service::get_local_streaming_priority(); - co_await d.reshard(std::move(info_vec), cm, table, max_threshold, creator, iop); - co_await d.move_foreign_sstables(dir); - }); - auto duration = std::chrono::duration_cast>(std::chrono::steady_clock::now() - start); - dblog.info("{}", fmt::format("Resharded {} for {}.{} in {:.2f} seconds, {}", sstables::pretty_printed_data_size(total_size), ks_name, table_name, duration.count(), sstables::pretty_printed_throughput(total_size, duration))); + co_await dir.invoke_on_all([&] (sstables::sstable_directory& d) -> future<> { + auto& table = db.local().find_column_family(ks_name, table_name); + auto info_vec = std::move(reshard_jobs[this_shard_id()].info_vec); + auto& cm = db.local().get_compaction_manager(); + auto max_threshold = table.schema()->max_compaction_threshold(); + auto& iop = service::get_local_streaming_priority(); + co_await d.reshard(std::move(info_vec), cm, table, max_threshold, creator, iop); + co_await d.move_foreign_sstables(dir); + }); + + auto duration = std::chrono::duration_cast>(std::chrono::steady_clock::now() - start); + dblog.info("{}", fmt::format("Resharded {} for {}.{} in {:.2f} seconds, {}", sstables::pretty_printed_data_size(total_size), ks_name, table_name, duration.count(), sstables::pretty_printed_throughput(total_size, duration))); } // Global resharding function. Done in two parts: