summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp
diff options
context:
space:
mode:
authorGrace Luong <grace.luong@mongodb.com>2020-07-24 22:35:32 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-07-25 02:25:37 +0000
commit0045dc81dfadc33d60130dbb575a7a0a74305924 (patch)
tree4b2e3f8dbd3351e8cfb9ba2574d6384c7bba8126 /src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp
parent32b754043dd3af1e45e9931b231fb4d98f1730b5 (diff)
downloadmongo-0045dc81dfadc33d60130dbb575a7a0a74305924.tar.gz
SERVER-49070: add and use FCV gating helpers
Diffstat (limited to 'src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp')
-rw-r--r--src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp b/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp
index c1bc9b7ac83..1da6ec13f11 100644
--- a/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp
+++ b/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp
@@ -179,7 +179,8 @@ void ReplSetHeartbeatArgsV1::addToBSON(BSONObjBuilder* builder) const {
builder->appendIntOrLL(kTermFieldName, _term);
// TODO SERVER-49382: Remove this FCV check after we branch for 4.7.
- if (serverGlobalParams.featureCompatibility.isVersion(
+ if (serverGlobalParams.featureCompatibility.isVersionInitialized() &&
+ serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
ServerGlobalParams::FeatureCompatibility::Version::kVersion451)) {
builder->append(kPrimaryIdFieldName, _primaryId);
}