summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2017-01-20 18:58:49 -0500
committerEsha Maharishi <esha.maharishi@mongodb.com>2017-01-23 15:19:28 -0500
commitac5d193edf5c1e170119871dd4bfdc5a839fc1cf (patch)
treea428118e57471324f362dd602306e375424e0fcc /src/mongo/db/s/migration_destination_manager_legacy_commands.cpp
parent7480e053bb992f869bf83c8e54ee088afa199bb9 (diff)
downloadmongo-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.cpp19
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));