Gleb Natapov
<gleb@scylladb.com>unread,Jan 13, 2025, 3:20:48 AMJan 13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
to scylladb-dev@googlegroups.com
We want to drop ips from token_metadata so move to different API to map
ip to id.
---
db/hints/manager.cc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/db/hints/manager.cc b/db/hints/manager.cc
index 17332a0f52d..7cdb515352b 100644
--- a/db/hints/manager.cc
+++ b/db/hints/manager.cc
@@ -335,10 +335,11 @@ future<> manager::wait_for_sync_point(abort_source& as, const sync_point::shard_
for (const auto& [addr, rp] : rps) {
if (std::holds_alternative<gms::inet_address>(addr)) {
- const auto maybe_hid = tmptr->get_host_id_if_known(std::get<gms::inet_address>(addr));
- // Ignore the IPs we cannot map.
- if (maybe_hid) [[likely]] {
- hid_rps.emplace(*maybe_hid, rp);
+ try {
+ const auto hid = _gossiper_anchor->get_host_id(std::get<gms::inet_address>(addr));
+ hid_rps.emplace(hid, rp);
+ } catch (...) {
+ // Ignore the IPs we cannot map.
}
} else {
hid_rps.emplace(std::get<locator::host_id>(addr), rp);
--
2.47.1