[SERVER-46303] Omit configTerm from heartbeat requests and responses if replica set config lacks term Created: 21/Feb/20  Updated: 29/Oct/23  Resolved: 24/Feb/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Improvement Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Minor Change
Sprint: Repl 2020-02-24
Participants:
Linked BF Score: 0

 Description   

In 4.4 we introduce a "term" field to replica set configs, and include the term as a "configTerm" field in heartbeat requests and responses. A MongoDB 4.4 server will understand this field (even if it's in FCV 4.2), but older MongoDB servers will reject a heartbeat request or response that includes this new field.

If the local config lacks a term (which is expressed in the code as term -1, orĀ OpTime::kUninitializedTerm), then omit configTerm from heartbeats. This way, MongoDB 4.4 heartbeats will be compatible with 4.2, so long as the local config is in the 4.2 format and lacks a term.



 Comments   
Comment by Githook User [ 24/Feb/20 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: SERVER-46303 Omit configTerm -1 from heartbeats
Branch: master
https://github.com/mongodb/mongo/commit/e433f91f86eb909d8de849798e1fdbd4c98147a5

Generated at Thu Feb 08 05:11:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.