diff options
author | Esha Maharishi <esha.maharishi@mongodb.com> | 2017-01-20 18:58:49 -0500 |
---|---|---|
committer | Esha Maharishi <esha.maharishi@mongodb.com> | 2017-01-23 15:19:28 -0500 |
commit | ac5d193edf5c1e170119871dd4bfdc5a839fc1cf (patch) | |
tree | a428118e57471324f362dd602306e375424e0fcc /src/mongo/db/s/migration_destination_manager_legacy_commands.cpp | |
parent | 7480e053bb992f869bf83c8e54ee088afa199bb9 (diff) | |
download | mongo-ac5d193edf5c1e170119871dd4bfdc5a839fc1cf.tar.gz |
SERVER-27625 remove dead ANSA and setShardVersion code
Diffstat (limited to 'src/mongo/db/s/migration_destination_manager_legacy_commands.cpp')
-rw-r--r-- | src/mongo/db/s/migration_destination_manager_legacy_commands.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp index a20db670259..c55a317e99f 100644 --- a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp +++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp @@ -91,27 +91,12 @@ public: int, string& errmsg, BSONObjBuilder& result) { - ShardingState* const shardingState = ShardingState::get(txn); + auto shardingState = ShardingState::get(txn); + uassertStatusOK(shardingState->canAcceptShardedCommands()); const ShardId toShard(cmdObj["toShardName"].String()); const ShardId fromShard(cmdObj["fromShardName"].String()); - if (!shardingState->enabled()) { - if (!cmdObj["configServer"].eoo()) { - dassert(cmdObj["configServer"].type() == String); - shardingState->initializeFromConfigConnString( - txn, cmdObj["configServer"].String(), toShard.toString()); - } else { - errmsg = str::stream() - << "cannot start recv'ing chunk, " - << "sharding is not enabled and no config server was provided"; - - warning() << errmsg; - return false; - } - } - - const NamespaceString nss(cmdObj.firstElement().String()); const auto chunkRange = uassertStatusOK(ChunkRange::fromBSON(cmdObj)); |