locator: effective_replication_map: Abstract get_pending_endpoints()

This commit is contained in:
Tomasz Grabiec
2023-03-21 17:20:42 +01:00
parent 7b01fe8742
commit 1343bfa708
3 changed files with 7 additions and 2 deletions

View File

@@ -103,6 +103,10 @@ inet_address_vector_replica_set effective_replication_map::get_natural_endpoints
return natural_endpoints;
}
inet_address_vector_topology_change effective_replication_map::get_pending_endpoints(const token& search_token, const sstring& ks_name) const {
return _tmptr->pending_endpoints_for(search_token, ks_name);
}
void abstract_replication_strategy::validate_replication_factor(sstring rf)
{
if (rf.empty() || std::any_of(rf.begin(), rf.end(), [] (char c) {return !isdigit(c);})) {

View File

@@ -205,6 +205,7 @@ public:
inet_address_vector_replica_set get_natural_endpoints(const token& search_token) const;
stop_iteration for_each_natural_endpoint_until(const token& search_token, const noncopyable_function<stop_iteration(const inet_address&)>& func) const;
inet_address_vector_replica_set get_natural_endpoints_without_node_being_replaced(const token& search_token) const;
inet_address_vector_topology_change get_pending_endpoints(const token& search_token, const sstring& ks_name) const;
// get_ranges() returns the list of ranges held by the given endpoint.
// The list is sorted, and its elements are non overlapping and non wrap-around.