|
The class ReplSetHealthPollTask has a copy of a HeartbeatInfo that it passes to Members upon each heartbeat. This copy's lastHeartbeatRecv value is never updated. Only the copy in the Member's HeartbeatInfo is updated.
Therefore, ReplSetHealthPollTask::m.lastHeartbeatRecv is never accurate.
Basically, the following code in ReplSetHealthPollTask::down is a no-op, because the if-clause will always evaluate to false:
if (m.lastHeartbeatRecv+2 >= time(0)) {
|
log() << "replset info " << h.toString()
|
<< " just heartbeated us, but our heartbeat failed: " << msg
|
<< ", not changing state" << rsLog;
|
// we don't update any of the heartbeat info, though, since we didn't get any info
|
// other than "not down" from having it heartbeat us
|
return;
|
}
|
|