summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/feature_compatibility_version.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/commands/feature_compatibility_version.cpp b/src/mongo/db/commands/feature_compatibility_version.cpp
index 20935c0a4f2..a387b69d2a0 100644
--- a/src/mongo/db/commands/feature_compatibility_version.cpp
+++ b/src/mongo/db/commands/feature_compatibility_version.cpp
@@ -289,6 +289,10 @@ public:
virtual void append(OperationContext* opCtx, BSONObjBuilder& b, const std::string& name) {
BSONObjBuilder featureCompatibilityVersionBuilder(b.subobjStart(name));
+ uassert(ErrorCodes::UnknownFeatureCompatibilityVersion,
+ str::stream() << FeatureCompatibilityVersionParser::kParameterName
+ << " is not yet known.",
+ serverGlobalParams.featureCompatibility.isVersionInitialized());
switch (serverGlobalParams.featureCompatibility.getVersion()) {
case ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo40:
featureCompatibilityVersionBuilder.append(