diff options
author | Ian Boros <ian.boros@mongodb.com> | 2019-10-04 15:38:42 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-04 15:38:42 +0000 |
commit | 1f0ae1c45604798888f8b2425475a473d7265bd5 (patch) | |
tree | c331eebf5795422507c4826c4219c303a20edced /src/mongo/db/query/explain.cpp | |
parent | 2d671ab90e0282773ea89f1860705503dd5bf74d (diff) | |
download | mongo-1f0ae1c45604798888f8b2425475a473d7265bd5.tar.gz |
SERVER-43202 propagate errors from interrupts during yielding
Diffstat (limited to 'src/mongo/db/query/explain.cpp')
-rw-r--r-- | src/mongo/db/query/explain.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/query/explain.cpp b/src/mongo/db/query/explain.cpp index 977b7fdb1a1..f39f959b545 100644 --- a/src/mongo/db/query/explain.cpp +++ b/src/mongo/db/query/explain.cpp @@ -882,9 +882,10 @@ void Explain::explainStages(PlanExecutor* exec, if (verbosity >= ExplainOptions::Verbosity::kExecStats) { executePlanStatus = exec->executePlan(); - // If executing the query failed because it was killed, then the collection may no longer be - // valid. We indicate this by setting our collection pointer to null. - if (executePlanStatus == ErrorCodes::QueryPlanKilled) { + // If executing the query failed, for any number of reasons other than a planning failure, + // then the collection may no longer be valid. We conservatively set our collection pointer + // to null in case it is invalid. + if (executePlanStatus != ErrorCodes::NoQueryExecutionPlans) { collection = nullptr; } } |