diff --git a/dht/boot_strapper.cc b/dht/boot_strapper.cc index b6d3094b53..97dfce6422 100644 --- a/dht/boot_strapper.cc +++ b/dht/boot_strapper.cc @@ -51,7 +51,7 @@ future<> boot_strapper::bootstrap(streaming::stream_reason reason, gms::gossiper auto& strategy = erm->get_replication_strategy(); // We took a strategy ptr to keep it alive during the `co_await`. // The keyspace may be dropped in the meantime. - dht::token_range_vector ranges = co_await strategy.get_pending_address_ranges(_token_metadata_ptr, _tokens, _address); + dht::token_range_vector ranges = co_await strategy.get_pending_address_ranges(_token_metadata_ptr, _tokens, _address, _dr); blogger.debug("Will stream keyspace={}, ranges={}", keyspace_name, ranges); co_await streamer->add_ranges(keyspace_name, erm, ranges, gossiper, reason == streaming::stream_reason::replace); } diff --git a/locator/abstract_replication_strategy.cc b/locator/abstract_replication_strategy.cc index ab3fd01e05..98368e814a 100644 --- a/locator/abstract_replication_strategy.cc +++ b/locator/abstract_replication_strategy.cc @@ -284,7 +284,7 @@ abstract_replication_strategy::get_range_addresses(const token_metadata& tm) con } future -abstract_replication_strategy::get_pending_address_ranges(const token_metadata_ptr tmptr, std::unordered_set pending_tokens, inet_address pending_address) const { +abstract_replication_strategy::get_pending_address_ranges(const token_metadata_ptr tmptr, std::unordered_set pending_tokens, inet_address pending_address, locator::endpoint_dc_rack dr) const { dht::token_range_vector ret; token_metadata temp; temp = co_await tmptr->clone_only_token_map(); diff --git a/locator/abstract_replication_strategy.hh b/locator/abstract_replication_strategy.hh index e4dd4537a6..3bc0808627 100644 --- a/locator/abstract_replication_strategy.hh +++ b/locator/abstract_replication_strategy.hh @@ -123,7 +123,7 @@ public: // Caller must ensure that token_metadata will not change throughout the call. future> get_range_addresses(const token_metadata& tm) const; - future get_pending_address_ranges(const token_metadata_ptr tmptr, std::unordered_set pending_tokens, inet_address pending_address) const; + future get_pending_address_ranges(const token_metadata_ptr tmptr, std::unordered_set pending_tokens, inet_address pending_address, locator::endpoint_dc_rack dr) const; }; // Holds the full replication_map resulting from applying the diff --git a/repair/repair.cc b/repair/repair.cc index 3d8ea780d2..41fa0a3013 100644 --- a/repair/repair.cc +++ b/repair/repair.cc @@ -1351,7 +1351,7 @@ future<> repair_service::bootstrap_with_repair(locator::token_metadata_ptr tmptr continue; } auto& strat = erm->get_replication_strategy(); - dht::token_range_vector desired_ranges = strat.get_pending_address_ranges(tmptr, tokens, myip).get0(); + dht::token_range_vector desired_ranges = strat.get_pending_address_ranges(tmptr, tokens, myip, {}).get0(); seastar::thread::maybe_yield(); auto nr_tables = get_nr_tables(db.local(), keyspace_name); nr_ranges_total += desired_ranges.size() * nr_tables; @@ -1367,7 +1367,7 @@ future<> repair_service::bootstrap_with_repair(locator::token_metadata_ptr tmptr continue; } auto& strat = erm->get_replication_strategy(); - dht::token_range_vector desired_ranges = strat.get_pending_address_ranges(tmptr, tokens, myip).get0(); + dht::token_range_vector desired_ranges = strat.get_pending_address_ranges(tmptr, tokens, myip, {}).get0(); bool find_node_in_local_dc_only = strat.get_type() == locator::replication_strategy_type::network_topology; bool everywhere_topology = strat.get_type() == locator::replication_strategy_type::everywhere_topology; auto replication_factor = erm->get_replication_factor();