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

Increase heartbeat rate when a secondary has no sync source

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.4, 3.7.1
    • Replication
    • Fully Compatible
    • ALL
    • v3.6, v3.4
    • Repl 2017-12-04
    • 0

    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

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

              Dates

                Created:
                Updated:
                Resolved: