replica: distributed_loader: reindent run_resharding_jobs

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2022-05-19 13:15:54 +03:00
parent 29e51ed0cd
commit e1ba285d52

View File

@@ -189,21 +189,21 @@ future<> run_resharding_jobs(sharded<sstables::sstable_directory>& 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::duration<float>>(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::duration<float>>(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: