replication_strategy: Accept dc-rack as get_pending_address_ranges argument
The method creates a copy of token metadata and pushes an endpoint (with some tokens) into it. Next patches will require providing dc/rack info together with the endpoint, this patch prepares for that. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -284,7 +284,7 @@ abstract_replication_strategy::get_range_addresses(const token_metadata& tm) con
|
||||
}
|
||||
|
||||
future<dht::token_range_vector>
|
||||
abstract_replication_strategy::get_pending_address_ranges(const token_metadata_ptr tmptr, std::unordered_set<token> pending_tokens, inet_address pending_address) const {
|
||||
abstract_replication_strategy::get_pending_address_ranges(const token_metadata_ptr tmptr, std::unordered_set<token> 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();
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
// Caller must ensure that token_metadata will not change throughout the call.
|
||||
future<std::unordered_map<dht::token_range, inet_address_vector_replica_set>> get_range_addresses(const token_metadata& tm) const;
|
||||
|
||||
future<dht::token_range_vector> get_pending_address_ranges(const token_metadata_ptr tmptr, std::unordered_set<token> pending_tokens, inet_address pending_address) const;
|
||||
future<dht::token_range_vector> get_pending_address_ranges(const token_metadata_ptr tmptr, std::unordered_set<token> pending_tokens, inet_address pending_address, locator::endpoint_dc_rack dr) const;
|
||||
};
|
||||
|
||||
// Holds the full replication_map resulting from applying the
|
||||
|
||||
Reference in New Issue
Block a user