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

electionTime field not set in heartbeat response from primary under protocol version 1

    • Fully Compatible
    • ALL
    • Repl F (01/29/16)

      The electionTime field is not set in the heartbeat response from a primary.

      On secondary, set log level to make command responses visible:

      db.setLogLevel(4, 'executor')
      

      In the secondary node's logs, examine log messages containing Received remote response: RemoteResponse with the fields hbmsg: "" and state: 1

      2016-01-14T15:15:10.301-0500 D EXECUTOR [NetworkInterfaceASIO-Replication-0] Received remote response: RemoteResponse --  cmd:{ ok: 1.0, state: 1, v: 3, hbmsg: "", set: "foo", term: 4, primaryId: 1, opTime: { ts: Timestamp 1452802429000|2, t: 4 } }
      

      Primary should be reporting its election time in the field electionTime:

      2016-01-14T15:22:16.859-0500 D EXECUTOR [NetworkInterfaceASIO-Replication-0] Received remote response: RemoteResponse --  cmd:{ ok: 1.0, electionTime: new Date(6239740960213827585), state: 1, v: 3, hbmsg: "", set: "foo", term: 5, primaryId: 0, opTime: { ts: Timestamp 1452802904000|2, t: 5 } }
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: