Gleb Natapov
1e4b2f25dc
locator: token_metadata: drop update_host_id() function that does nothing now
2025-01-16 16:37:08 +02:00
Gleb Natapov
50fb22c8f9
locator: topology: drop indexing by ips
...
Do not track id to ip mapping in the topology class any longer. There
are no remaining users.
2025-01-16 16:37:08 +02:00
Gleb Natapov
f9df092fd1
repair: drop unneeded code
...
There is a code that creates a map from id to ip and then creates a
vector from the keys of the map. Create a vector directly instead.
2025-01-16 16:37:08 +02:00
Gleb Natapov
12da203cae
storage_service: use host_id to look for a node in on_alive handler
2025-01-16 16:37:08 +02:00
Gleb Natapov
d45ce6fa12
storage_proxy: translate ips to ids in forward array using gossiper
...
We already use it to translate reply_to, so do it for consistency and to
drop ip based API usage.
2025-01-16 16:37:08 +02:00
Gleb Natapov
db73758655
locator: topology: remove unused functions
2025-01-16 16:37:07 +02:00
Gleb Natapov
fb28ff5176
storage_service: check for outdated ip in on_change notification in the peers table
...
The code checks that it does not run for an ip address that is no longer
in use (after ip address change). To check that we can use peers table
and see if the host id is mapped to the address. If yes, this is the
latest address for this host id otherwise this is an outdated entry.
2025-01-16 16:37:07 +02:00
Gleb Natapov
163099678e
storage_proxy: translate id to ip using address map in tablets's describe_ring code instead of taking one from the topology
...
We want to drop ip from the locator::node.
2025-01-16 16:37:07 +02:00
Gleb Natapov
49fa1130ef
topology coordinator: change connection dropping code to work on host ids
...
Do not use ip from topology::node, but look it up in address map
instead. We want to drop ip from the topology::node.
2025-01-16 16:37:07 +02:00
Gleb Natapov
83d15b8e32
cql3: report host id instead of ip in error during SELECT FROM MUTATION_FRAGMENTS query
...
We want to drop ip from the topology::node.
2025-01-16 16:37:07 +02:00
Gleb Natapov
5cd3627baa
locator: drop unused function from tablet_effective_replication_map
2025-01-16 16:37:07 +02:00
Gleb Natapov
122d58b4ad
api: view_build_statuses: do not use IP from the topology, but translate id to ip using address map instead
2025-01-16 16:37:07 +02:00
Gleb Natapov
97f95f1dbd
locator: token_metadata: remove unused ip based functions
2025-01-16 16:37:07 +02:00
Gleb Natapov
3068e38baa
locator: network_topology_strategy: use host_id based function to check number of endpoints in dcs
2025-01-16 16:37:07 +02:00
Gleb Natapov
0ec9f7de64
gossiper: drop get_unreachable_token_owners functions
...
It is used by truncate code only and even there it only check if the
returned set is not empty. Check for dead token owners in the truncation
code directly.
2025-01-16 16:37:07 +02:00
Gleb Natapov
a7a7cdcf42
storage_service: use gossiper to map ip to id in node_ops operations
...
Replace operation is special though. In case of replacing with the same
IP the gossiper will not have the mapping, and node_ops RPC
unfortunately does not send host id of a replaced node. For replace we
consult peers table instead to find the old owner of the IP. A node that
is replacing (the coordinator of the replace) will not have it though,
but luckily it is not needed since it updates metadata during
join_topology() anyway. The only thing that is missing there is
add_replacing_endpoint() call which the patch adds.
2025-01-16 16:37:07 +02:00
Gleb Natapov
0db6136fa5
storage_service: fix indentation after the last patch
2025-01-16 16:37:07 +02:00
Gleb Natapov
9197b88e48
storage_service: drop loops from node ops replace_prepare handling since there can be only one replacing node
...
The call already throw an error if there are more than one. Throw is
there are zero as well and drop the loops.
2025-01-16 16:37:07 +02:00
Gleb Natapov
fcfd005023
token_metadata: drop no longer used functions
2025-01-16 16:37:07 +02:00
Gleb Natapov
7c4c485651
host_id_or_endpoint: use gossiper to resolve ip to id and back mappings
...
host_id_or_endpoint is a helper class that hold either id or ip and
translate one into another on demand. Use gossiper to do a translation
there instead of token_metadata since we want to drop ip based APIs from
the later.
2025-01-16 16:37:07 +02:00
Gleb Natapov
70cc014307
storage_service: ip_address_updater: check peers table instead of token_metadata whether ip was changed
...
As part of changing IP address peers table is updated. If it has a new
address the update can be skipped.
2025-01-16 16:37:07 +02:00
Gleb Natapov
8e55cc6c78
storage_service: fix logging
...
When logger outputs a range it already does join, so no other join is
needed.
2025-01-16 16:37:07 +02:00
Gleb Natapov
7556e3d045
topology coordinator: remove gossiper entry only if host id matches provided one
...
Currently the entry is removed only if ip is not used by any normal or
transitioning node. This is done to not remove a wrong entry that just
happen to use the same ip, but the same can be achieved by checking host
id in the entry.
2025-01-16 16:37:07 +02:00
Gleb Natapov
593308a051
node_ops, cdc: drop remaining token_metadata::get_endpoint_for_host_id() usage
...
Use address map to translate id to ip instead. We want to drop ips from token_metadata.
2025-01-16 16:37:07 +02:00
Gleb Natapov
ae8dc595e1
hints: move id to ip translation into store_hint() function
...
Also use gossiper to translate instead of token_metadata since we want
to get rid of ip base APIs there.
2025-01-16 16:37:06 +02:00
Gleb Natapov
c7d08fe1fe
storage_service: change get_dc_rack_for() to work on host ids
2025-01-16 16:37:06 +02:00
Gleb Natapov
415e8de36e
locator: topology: change get_datacenter_endpoints and get_datacenter_racks to return host ids and amend users
2025-01-16 16:37:06 +02:00
Gleb Natapov
8a0fea5fef
locator: topology: drop is_me ip overload along with remaning users
2025-01-16 16:37:06 +02:00
Gleb Natapov
2ea8df2cf5
storage_proxy: drop is_alive that works on ip since it is not used any more
2025-01-16 16:37:06 +02:00
Gleb Natapov
8433947932
locator: topology: remove get_location overload that works on ip and its last users
2025-01-16 16:37:06 +02:00
Gleb Natapov
25eb98ecbc
locator: topology: drop no longer used ip based overloads
2025-01-16 16:37:06 +02:00
Gleb Natapov
315db647dd
consistency_level: drop templates since the same types of ranges are used by all the callers
2025-01-16 16:37:06 +02:00
Gleb Natapov
1b6e1456e5
messaging_service: drop the usage of ip based token_metadata APIs
...
We want to drop ips from token_metadata so move to use host id based
counterparts. Messaging service gets a function that maps from ips to id
when is starts listening.
2025-01-16 16:37:06 +02:00
Gleb Natapov
da9b7b2626
storage_service: drop ip based topology::get_datacenter() usage
...
We want to drop ips from the topology eventually.
2025-01-16 16:37:06 +02:00
Gleb Natapov
36ccc897e8
gossiper: change get_live_members and all its users to work on host ids
2025-01-16 16:37:06 +02:00
Gleb Natapov
7a3237c687
messaging_service: drop get_raw_version and knows_version
...
The are unused. The version is always fixed.
2025-01-16 16:37:06 +02:00
Gleb Natapov
8cc09f4358
storage_service: do not use ip addresses from token_metadata in handling of a normal state
...
Instead use gossiper and peers table to retrieve same information.
Token_metadata is created from the mix of those two anyway. The goal is
to drop ips from token_metadata entirely.
2025-01-16 16:37:06 +02:00
Gleb Natapov
5262bbafff
locator: drop no longer used ip based functions
2025-01-16 16:37:06 +02:00
Gleb Natapov
542360e825
test: drop inet_address usage from network_topology_strategy_test
...
Move the test to work on host ids. IPs will be dropped eventually.
2025-01-16 16:37:06 +02:00
Gleb Natapov
9ea53a8656
storage_service: move describe ring and get_range_to_endpoint_map to use host ids inside and translate to ips at the last moment
...
The functions are called from RESful API so has to return ips for backwards
compatibility, but internally we can use host ids as long as possible
and convert to ips just before returning. This also drops usage of ip
based erm function which we want to get rid of.
2025-01-16 16:37:06 +02:00
Gleb Natapov
f03a575f3d
storage_service: move storage_service::get_natural_endpoints to use host ids internally and translate to ips before returning
...
The function is called by RESful API so has to return ips for backwards
compatibility, but internally we can use host ids as long as possible
and convert to ips just before returning. This also drops usage of ip
based erm function which we want to get rid of.
2025-01-16 16:37:06 +02:00
Gleb Natapov
6e6b2cfa63
storage_service: use existing util function instead of re-iplementing it
...
locator/util.hh already has get_range_to_address_map which is exactly
like the one in the storage_service. So remove the later one and use the
former instead.
2025-01-16 16:37:06 +02:00
Gleb Natapov
58f8395bc2
storage_service: use gossiper instead of token_metadata to map ip to id in gossiper notifications
...
We want to drop ips from token_metadata so move to different API to map
ip to id.
2025-01-16 16:35:13 +02:00
Gleb Natapov
0c930199f8
storage_service: use gossiper to map id to ip instead of token_metadata in node_ops_cmd_handler
...
We want to drop ips from token_metadata so move to different API to map
ip to id.
2025-01-15 16:30:29 +02:00
Gleb Natapov
5d4d9fd31d
storage_service: force_remove_completion use address map to resolve id to ip instead of token metadata
...
We want to drop ips from token_metadata so move to different API to map
ip to id.
2025-01-15 16:30:29 +02:00
Gleb Natapov
f5fa4d9742
topology coordinator: drop get_endpoint_for_host_id_if_known usage
...
Now that we have gossiper::get_endpoint_state_ptr that works on host ids
there is no need to translate id to ip at all.
2025-01-15 16:30:29 +02:00
Gleb Natapov
b3f8b579c0
gossiper: add get_endpoint_state_ptr() function that works on host id
...
Will be used later to simplify code.
2025-01-15 16:30:29 +02:00
Gleb Natapov
448282dc93
storage_proxy: used gossiper for map ip to host id in connection_dropped callback
...
We want to drop ips from token_metadata so move to different API to map
ip to id.
2025-01-15 16:30:29 +02:00
Gleb Natapov
ae821ba07a
repair: use gossiper to map ip to host id instead of token_metadata
...
We want to drop ips from token_metadata so move to different API to map
ip to id.
2025-01-15 16:30:29 +02:00
Gleb Natapov
8c85350d4b
db/virtual_tables: use host id from the gossiper endpoint state in cluster_status table
...
The state always has host id now, so there is no point to looks it up in
the token metadata.
2025-01-15 16:30:28 +02:00