diff options
author | David Storch <david.storch@10gen.com> | 2016-09-26 13:47:05 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2016-09-26 17:56:56 -0400 |
commit | 1d6dce66f73719e8bf710d5e1e19169b27f91344 (patch) | |
tree | 4e349ca3714ee4b16cd84616a7a1d4531b03c39d /src/mongo/db/query/plan_executor.cpp | |
parent | 50fd4e6c8e735ab00879547365f61a808b3f0313 (diff) | |
download | mongo-1d6dce66f73719e8bf710d5e1e19169b27f91344.tar.gz |
SERVER-24755 fix explain to handle collection drop during yield
Diffstat (limited to 'src/mongo/db/query/plan_executor.cpp')
-rw-r--r-- | src/mongo/db/query/plan_executor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/query/plan_executor.cpp b/src/mongo/db/query/plan_executor.cpp index ec4d3bf0c1d..d162e998bab 100644 --- a/src/mongo/db/query/plan_executor.cpp +++ b/src/mongo/db/query/plan_executor.cpp @@ -530,12 +530,18 @@ Status PlanExecutor::executePlan() { } if (PlanExecutor::DEAD == state || PlanExecutor::FAILURE == state) { + if (killed()) { + return Status(ErrorCodes::QueryPlanKilled, + str::stream() << "Operation aborted because: " << *_killReason); + } + return Status(ErrorCodes::OperationFailed, str::stream() << "Exec error: " << WorkingSetCommon::toStatusString(obj) << ", state: " << PlanExecutor::statestr(state)); } + invariant(!killed()); invariant(PlanExecutor::IS_EOF == state); return Status::OK(); } |