From facd5035f12748728aeaa16a02c299a0cb2d9a84 Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Tue, 21 Sep 2021 14:54:19 +0300 Subject: [PATCH] storage_proxy: use effective_replication_map token_metadata_ptr along with endpoints Use the same token_metadata used for get_natural_endpoints_without_node_being_replaced where used. Signed-off-by: Benny Halevy --- service/storage_proxy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index f3bf793354..ee0da8e063 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -1930,7 +1930,7 @@ storage_proxy::create_write_response_handler_helper(schema_ptr s, const dht::tok keyspace& ks = _db.local().find_keyspace(keyspace_name); auto erm = ks.get_effective_replication_map(); inet_address_vector_replica_set natural_endpoints = erm->get_natural_endpoints_without_node_being_replaced(token); - inet_address_vector_topology_change pending_endpoints = get_token_metadata_ptr()->pending_endpoints_for(token, keyspace_name); + inet_address_vector_topology_change pending_endpoints = erm->get_token_metadata_ptr()->pending_endpoints_for(token, keyspace_name); slogger.trace("creating write handler for token: {} natural: {} pending: {}", token, natural_endpoints, pending_endpoints); tracing::trace(tr_state, "Creating write handler for token: {} natural: {} pending: {}", token, natural_endpoints ,pending_endpoints); @@ -2255,7 +2255,7 @@ storage_proxy::get_paxos_participants(const sstring& ks_name, const dht::token & keyspace& ks = _db.local().find_keyspace(ks_name); auto erm = ks.get_effective_replication_map(); inet_address_vector_replica_set natural_endpoints = erm->get_natural_endpoints_without_node_being_replaced(token); - inet_address_vector_topology_change pending_endpoints = get_token_metadata_ptr()->pending_endpoints_for(token, ks_name); + inet_address_vector_topology_change pending_endpoints = erm->get_token_metadata_ptr()->pending_endpoints_for(token, ks_name); if (cl_for_paxos == db::consistency_level::LOCAL_SERIAL) { auto itend = boost::range::remove_if(natural_endpoints, std::not_fn(std::cref(db::is_local)));