diff --git a/repair/repair.cc b/repair/repair.cc index 1540acb627..885705aead 100644 --- a/repair/repair.cc +++ b/repair/repair.cc @@ -26,7 +26,8 @@ #include "dht/sharder.hh" #include "streaming/stream_reason.hh" #include "gms/inet_address.hh" -#include "service/storage_proxy.hh" +#include "utils/fb_utilities.hh" +#include "gms/gossiper.hh" #include "service/priority_manager.hh" #include "message/messaging_service.hh" #include "sstables/sstables.hh" @@ -1015,21 +1016,6 @@ static future<> repair_ranges(lw_shared_ptr ri) { }); } -static future<> try_wait_for_hints_to_be_replayed(repair_uniq_id id, std::vector source_nodes, std::vector target_nodes) { - auto get_elapsed_seconds = [start_time = lowres_clock::now()] { - return std::chrono::duration_cast(lowres_clock::now() - start_time).count(); - }; - auto& sp = service::get_local_storage_proxy(); - rlogger.info("repair id {}: started replaying hints before repair, source nodes: {}, target nodes: {}", id, source_nodes, target_nodes); - try { - co_await sp.wait_for_hints_to_be_replayed(id.uuid, std::move(source_nodes), std::move(target_nodes)); - rlogger.info("repair id {}: finished replaying hints (took {}s), continuing with repair", id, get_elapsed_seconds()); - } catch (...) { - rlogger.warn("repair id {}: failed to replay hints before repair (took {}s): {}, the repair will continue", id, get_elapsed_seconds(), std::current_exception()); - } - co_return; -} - // repair_start() can run on any cpu; It runs on cpu0 the function // do_repair_start(). The benefit of always running that function on the same // CPU is that it allows us to keep some state (like a list of ongoing @@ -1131,15 +1117,6 @@ int repair_service::do_repair_start(sstring keyspace, std::unordered_map> repair_results; repair_results.reserve(smp::count); auto table_ids = get_table_ids(db.local(), keyspace, cfs);