Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29946

Increase heartbeat rate when a secondary has no sync source

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.4, 3.7.1
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6, v3.4
    • Sprint:
      Repl 2017-12-04

      Description

      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.
          }
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: