summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/replication_info.cpp')
-rw-r--r--src/mongo/db/repl/replication_info.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_info.cpp b/src/mongo/db/repl/replication_info.cpp
index d27257a8eb0..d655ccfa73b 100644
--- a/src/mongo/db/repl/replication_info.cpp
+++ b/src/mongo/db/repl/replication_info.cpp
@@ -279,7 +279,14 @@ public:
appendReplicationInfo(txn, result, 0);
if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer) {
- result.append("configsvr", 1);
+ // If we have feature compatibility version 3.4, use a config server mode that 3.2
+ // mongos won't understand. This should prevent a 3.2 mongos from joining the cluster or
+ // making a connection to the config servers.
+ int configServerModeNumber = (serverGlobalParams.featureCompatibility.version.load() ==
+ ServerGlobalParams::FeatureCompatibility::Version::k34)
+ ? 2
+ : 1;
+ result.append("configsvr", configServerModeNumber);
}
result.appendNumber("maxBsonObjectSize", BSONObjMaxUserSize);