summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2018-07-11 12:06:27 -0400
committerjannaerin <golden.janna@gmail.com>2018-07-11 15:00:06 -0400
commitbccb252836954ac1963f8daf0d7bbdcf7af1d01c (patch)
tree01c71289f0bc551ab8be4399a1cfda84bac55b62
parent143b979d16031cdcb0d4b6ecc70a11da52822960 (diff)
downloadmongo-bccb252836954ac1963f8daf0d7bbdcf7af1d01c.tar.gz
SERVER-36071 Check status of shardsvrShardCollection
-rw-r--r--src/mongo/db/s/config/configsvr_shard_collection_command.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
index 57c6cdbd50a..f82809d2ab9 100644
--- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
+++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
@@ -855,11 +855,18 @@ public:
cmdObj, shardsvrShardCollectionRequest.toBSON())),
Shard::RetryPolicy::kIdempotent));
- CommandHelpers::filterCommandReplyForPassthrough(cmdResponse.response, &result);
+ // SERVER-14394 Remove status check below and replace with
+ // filterCommandReplyForPassthrough
+ uassertStatusOK(cmdResponse.commandStatus);
auto shardCollResponse = ShardsvrShardCollectionResponse::parse(
IDLParserErrorContext("ShardsvrShardCollectionResponse"), cmdResponse.response);
+ result << "collectionsharded" << nss.ns();
+ if (uuid) {
+ result << "collectionUUID" << *uuid;
+ }
+
// Make sure the cached metadata for the collection knows that we are now sharded
catalogCache->invalidateShardedCollection(nss);