{
dout(20) << __func__ << " with " << peer << dendl;
if (live_pinging.count(peer)) {
- dout(20) << peer << " already in live_pinging ... return " << dendl;
+ // This peer is already being pinged
+ // so we don't need to schedule another ping_check
+ // against it, ping_check will call itself because it is self-sustaining.
+ dout(20) << peer << " is already being pinged ... return " << dendl;
return;
}
// Check if quorum feature is not set and we are in
<< " no need to schedule ping_check" << dendl;
return;
}
- dout(30) << "schedule ping_check against peer: " << peer << dendl;
+ dout(30) << "schedule ping_check against peer: "
+ << peer << " every " << ping_timeout / PING_DIVISOR << "s" << dendl;
mon->timer.add_event_after(ping_timeout / PING_DIVISOR,
new C_MonContext{mon, [this, peer](int) {
ping_check(peer);
MMonPing *ping = new MMonPing(MMonPing::PING, now, peer_tracker.get_encoded_bl());
mon->messenger->send_to_mon(ping, mon->monmap->get_addrs(peer));
peer_sent_ping[peer] = now;
- dout(20) << " sent ping successfully to peer: " << peer << dendl;
+ dout(20) << " sent ping to peer: " << peer << " at " << now << dendl;
return true;
}
}
}
- dout(30) << "schedule " << __func__ << " against peer: "<< peer << dendl;
+ dout(30) << "Scheduling next ping_check for peer "
+ << peer << " in " << ping_timeout / PING_DIVISOR
+ << "s (recursively call ping_check until connection state changes)" << dendl;
mon->timer.add_event_after(ping_timeout / PING_DIVISOR,
new C_MonContext{mon, [this, peer](int) {
ping_check(peer);