From a495b71858bf81e052d437f0b06cb5817fd86667 Mon Sep 17 00:00:00 2001 From: Asias He Date: Wed, 9 Nov 2022 10:00:43 +0800 Subject: [PATCH] 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 --- locator/token_metadata.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locator/token_metadata.cc b/locator/token_metadata.cc index 999a6cb2b0..0e807c41ca 100644 --- a/locator/token_metadata.cc +++ b/locator/token_metadata.cc @@ -555,7 +555,7 @@ const std::unordered_map& 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) {