|
SERVER-19898 tried to do the same thing, but it actually did the opposite. min(_rsConfig.getElectionTimeoutPeriod() / 2, _rsConfig.getHeartbeatInterval() / 4) could be a reasonable heartbeat rate - 500ms by default.
// Arbiters also use half the election timeout period for their heartbeat frequency
|
Milliseconds heartbeatInterval;
|
if (_rsConfig.getProtocolVersion() == 1 &&
|
(getMemberState().arbiter() || (getSyncSourceAddress().empty() && !_iAmPrimary()))) {
|
heartbeatInterval = _rsConfig.getElectionTimeoutPeriod() / 2; // 5 seconds by default.
|
} else {
|
heartbeatInterval = _rsConfig.getHeartbeatInterval(); // 2 seconds by default.
|
}
|
|