summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_fetcher.cpp
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2017-10-04 16:52:54 -0400
committerLouis Williams <louis.williams@mongodb.com>2017-10-06 17:46:07 -0400
commit3d42a318626e059b2669356bb5d39056b8fa1b76 (patch)
tree72765174ead0fc800bfc678b7a7ce9152ba586c0 /src/mongo/db/repl/oplog_fetcher.cpp
parentbb71f4a4bea6c030675477d0dce18f77d0ee4b4b (diff)
downloadmongo-3d42a318626e059b2669356bb5d39056b8fa1b76.tar.gz
SERVER-30745 Prohibit unsafe comparisons against featureCompatibilityVersion
Diffstat (limited to 'src/mongo/db/repl/oplog_fetcher.cpp')
-rw-r--r--src/mongo/db/repl/oplog_fetcher.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/repl/oplog_fetcher.cpp b/src/mongo/db/repl/oplog_fetcher.cpp
index b4b0b024e4f..12cc813de49 100644
--- a/src/mongo/db/repl/oplog_fetcher.cpp
+++ b/src/mongo/db/repl/oplog_fetcher.cpp
@@ -367,8 +367,7 @@ BSONObj OplogFetcher::_makeFindCommandObject(const NamespaceString& nss,
// TODO(SERVER-30977): Remove the term comparison when this ticket is fixed.
if (term == lastOpTimeFetched.getTerm()) {
cmdBob.append("readConcern",
- serverGlobalParams.featureCompatibility.version.load() ==
- ServerGlobalParams::FeatureCompatibility::Version::k34
+ !serverGlobalParams.featureCompatibility.isFullyUpgradedTo36()
? BSON("afterOpTime" << lastOpTimeFetched)
: BSON("afterClusterTime" << lastOpTimeFetched.getTimestamp()));
}