token_metadata: Do not use topology info for is_member check
Since commit a980f94 (token_metadata: impl: keep the set of normal token
owners as a member), we have a set, _normal_token_owners, which contains
all the nodes in the ring.
We can use _normal_token_owners to check if a node is part of the ring
directly instead of going through the _toplogy indirectly.
Fixes #11935
This commit is contained in:
@@ -555,7 +555,7 @@ const std::unordered_map<inet_address, host_id>& token_metadata_impl::get_endpoi
|
||||
}
|
||||
|
||||
bool token_metadata_impl::is_member(inet_address endpoint) const {
|
||||
return _topology.has_endpoint(endpoint, topology::pending::no);
|
||||
return _normal_token_owners.contains(endpoint);
|
||||
}
|
||||
|
||||
void token_metadata_impl::add_bootstrap_token(token t, inet_address endpoint) {
|
||||
|
||||
Reference in New Issue
Block a user