diff options
Diffstat (limited to 'src/mongo/s/server.cpp')
-rw-r--r-- | src/mongo/s/server.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp index 874cee5929f..cd98e0cc6dc 100644 --- a/src/mongo/s/server.cpp +++ b/src/mongo/s/server.cpp @@ -326,6 +326,15 @@ MONGO_INITIALIZER_GENERAL(ForkServer, ("EndStartupOptionHandling"), ("default")) return Status::OK(); } +// We set the featureCompatibilityVersion to 3.4 in the mongos so that BSON validation always uses +// BSONVersion::kLatest. +MONGO_INITIALIZER_WITH_PREREQUISITES(SetFeatureCompatibilityVersion34, ("EndStartupOptionStorage")) +(InitializerContext* context) { + mongo::serverGlobalParams.featureCompatibilityVersion.store( + ServerGlobalParams::FeatureCompatibilityVersion_34); + return Status::OK(); +} + /* * This function should contain the startup "actions" that we take based on the startup config. It * is intended to separate the actions from "storage" and "validation" of our startup configuration. |