-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Minor Change
-
Repl 2020-02-24
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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.