mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 05:26:58 +00:00
Report a warning when a server's IP cannot be found in ping.
Fixes #12156 Closes #12206
This commit is contained in:
committed by
Kamil Braun
parent
51f867339e
commit
cd2e786d72
@@ -445,6 +445,10 @@ future<bool> direct_fd_pinger::ping(direct_failure_detector::pinger::endpoint_id
|
||||
auto dst_id = raft::server_id{std::move(id)};
|
||||
auto addr = _address_map.find(dst_id);
|
||||
if (!addr) {
|
||||
auto [it, _] = _rate_limits.try_emplace(id, std::chrono::minutes(5));
|
||||
auto& rate_limit = it->second;
|
||||
|
||||
rslog.log(log_level::warn, rate_limit, "Raft server id {} cannot be translated to an IP address.", id);
|
||||
co_return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +149,9 @@ class direct_fd_pinger : public seastar::peering_sharded_service<direct_fd_pinge
|
||||
netw::messaging_service& _ms;
|
||||
raft_address_map& _address_map;
|
||||
|
||||
using rate_limits = std::unordered_map<direct_failure_detector::pinger::endpoint_id, logger::rate_limit>;
|
||||
rate_limits _rate_limits;
|
||||
|
||||
public:
|
||||
direct_fd_pinger(netw::messaging_service& ms, raft_address_map& address_map)
|
||||
: _ms(ms), _address_map(address_map) {}
|
||||
|
||||
Reference in New Issue
Block a user