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

Increase heartbeat rate when a secondary has no sync source

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.4, 3.7.1
    • Affects Version/s: None
    • Component/s: Replication
    • Fully Compatible
    • ALL
    • v3.6, v3.4
    • Repl 2017-12-04
    • 0

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

            Assignee:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: