mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-05 14:33:08 +00:00
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 <bhalevy@scylladb.com>
This commit is contained in:
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user