[SERVER-22190] electionTime field not set in heartbeat response from primary under protocol version 1 Created: 14/Jan/16  Updated: 25/Jan/17  Resolved: 15/Jan/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.2.1
Fix Version/s: 3.2.3, 3.3.1

Type: Bug Priority: Minor - P4
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: code-and-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Repl F (01/29/16)
Participants:

 Description   

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



 Comments   
Comment by Githook User [ 15/Jan/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-22190 set electionTime in heartbeart response under protocol version 1

(cherry picked from commit 9e99ca9e22553fe7f18f3147af4b41c1da076c7a)
Branch: v3.2
https://github.com/mongodb/mongo/commit/d1f62c6fbcc0833e3889fa1baa71e30525461c6b

Comment by Githook User [ 15/Jan/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-22190 set electionTime in heartbeart response under protocol version 1
Branch: master
https://github.com/mongodb/mongo/commit/9e99ca9e22553fe7f18f3147af4b41c1da076c7a

Generated at Thu Feb 08 03:59:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.