summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Banala <arun.banala@10gen.com>2019-09-23 21:53:36 +0000
committerevergreen <evergreen@mongodb.com>2019-09-23 21:53:36 +0000
commit7dd8f43da5241570853d27eb8f55888f4e059f66 (patch)
tree29b0f7aabd4366e76671650d617d028bba5a2d59
parent2b0786f46b63e6210c26fc510575cc4ad039700a (diff)
downloadmongo-7dd8f43da5241570853d27eb8f55888f4e059f66.tar.gz
SERVER-41099 Fix incorrect error propagation from shards for explain command
(cherry picked from commit e3100715023f73e0cd41bb1fc4c017b2366003d0)
-rw-r--r--src/mongo/s/commands/cluster_explain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_explain.cpp b/src/mongo/s/commands/cluster_explain.cpp
index 5bf45170bd7..089b7a4221f 100644
--- a/src/mongo/s/commands/cluster_explain.cpp
+++ b/src/mongo/s/commands/cluster_explain.cpp
@@ -108,7 +108,7 @@ std::vector<Strategy::CommandResult> ClusterExplain::downconvert(
OperationContext* opCtx, const std::vector<AsyncRequestsSender::Response>& responses) {
std::vector<Strategy::CommandResult> results;
for (auto& response : responses) {
- Status status = Status::OK();
+ Status status = response.swResponse.getStatus();
if (response.swResponse.isOK()) {
auto& result = response.swResponse.getValue().data;
status = getStatusFromCommandResult(result);