Skip to content

Commit 51251b3

Browse files
committed
Revert "SERVER-32051 Require shard servers and config servers to be replica sets"
This reverts commit e35e66b. Part of SERVER-32080 as well.
1 parent 51eef79 commit 51251b3

File tree

4 files changed

+6
-68
lines changed

4 files changed

+6
-68
lines changed

jstests/sharding/require_shardsvrs_and_configsvrs_to_be_replica_sets.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

jstests/sharding/shard_config_db_collections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
{
149149
jsTest.setOption('enableTestCommands', false);
150150

151-
var st = new ShardingTest({shards: 2, rs: true});
151+
var st = new ShardingTest({shards: 2});
152152
var admin = st.s.getDB('admin');
153153

154154
assert.commandWorked(

src/mongo/db/SConscript

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ env.Library(
414414
],
415415
LIBDEPS=[
416416
'$BUILD_DIR/mongo/db/storage/mmap_v1/mmap_v1_options',
417-
'commands/test_commands_enabled',
418417
'repl/repl_settings',
419418
'server_options',
420419
'storage/storage_options',

src/mongo/db/mongod_options.cpp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -453,17 +453,16 @@ Status addMongodOptions(moe::OptionSection* options) {
453453
"configsvr",
454454
moe::Switch,
455455
"declare this is a config db of a cluster; default port 27019; "
456-
"default dir /data/configdb; requires using --replSet")
456+
"default dir /data/configdb")
457457
.setSources(moe::SourceAllLegacy)
458458
.incompatibleWith("shardsvr")
459459
.incompatibleWith("nojournal");
460460

461461
sharding_options
462-
.addOptionChaining(
463-
"shardsvr",
464-
"shardsvr",
465-
moe::Switch,
466-
"declare this is a shard db of a cluster; default port 27018; requires using --replSet")
462+
.addOptionChaining("shardsvr",
463+
"shardsvr",
464+
moe::Switch,
465+
"declare this is a shard db of a cluster; default port 27018")
467466
.setSources(moe::SourceAllLegacy)
468467
.incompatibleWith("configsvr")
469468
.incompatibleWith("master")
@@ -1199,14 +1198,6 @@ Status storeMongodOptions(const moe::Environment& params) {
11991198
}
12001199
if (params.count("sharding.clusterRole")) {
12011200
auto clusterRoleParam = params["sharding.clusterRole"].as<std::string>();
1202-
1203-
if (!params.count("replication.replSet") && !Command::testCommandsEnabled) {
1204-
return {ErrorCodes::InvalidOptions,
1205-
str::stream() << "Cannot start a " << clusterRoleParam
1206-
<< " as a standalone server. Please start this node as a replica "
1207-
"set using --replSet."};
1208-
}
1209-
12101201
if (clusterRoleParam == "configsvr") {
12111202
serverGlobalParams.clusterRole = ClusterRole::ConfigServer;
12121203

0 commit comments

Comments
 (0)