summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/commands/cluster_enable_sharding_cmd.cpp')
-rw-r--r--src/mongo/s/commands/cluster_enable_sharding_cmd.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp b/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
index d33823630dc..80067cbeea3 100644
--- a/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
+++ b/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
@@ -99,19 +99,14 @@ public:
ON_BLOCK_EXIT([opCtx, db] { Grid::get(opCtx)->catalogCache()->purgeDatabase(db); });
auto configShard = Grid::get(opCtx)->shardRegistry()->getConfigShard();
- auto cmdResponseStatus = uassertStatusOK(configShard->runCommandWithFixedRetryAttempts(
+ auto cmdResponse = uassertStatusOK(configShard->runCommandWithFixedRetryAttempts(
opCtx,
ReadPreferenceSetting(ReadPreference::PrimaryOnly),
"admin",
Command::appendPassthroughFields(cmdObj, BSON("_configsvrEnableSharding" << db)),
Shard::RetryPolicy::kIdempotent));
- uassertStatusOK(cmdResponseStatus.commandStatus);
-
- if (!cmdResponseStatus.writeConcernStatus.isOK()) {
- appendWriteConcernErrorToCmdResponse(
- configShard->getId(), cmdResponseStatus.response["writeConcernError"], result);
- }
+ Command::filterCommandReplyForPassthrough(cmdResponse.response, &result);
return true;
}