diff options
author | jannaerin <golden.janna@gmail.com> | 2018-07-11 12:06:27 -0400 |
---|---|---|
committer | jannaerin <golden.janna@gmail.com> | 2018-07-11 15:00:06 -0400 |
commit | bccb252836954ac1963f8daf0d7bbdcf7af1d01c (patch) | |
tree | 01c71289f0bc551ab8be4399a1cfda84bac55b62 | |
parent | 143b979d16031cdcb0d4b6ecc70a11da52822960 (diff) | |
download | mongo-bccb252836954ac1963f8daf0d7bbdcf7af1d01c.tar.gz |
SERVER-36071 Check status of shardsvrShardCollection
-rw-r--r-- | src/mongo/db/s/config/configsvr_shard_collection_command.cpp | 9 |
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); |