diff options
Diffstat (limited to 'src/mongo/db/exec')
-rw-r--r-- | src/mongo/db/exec/multi_plan.cpp | 11 | ||||
-rw-r--r-- | src/mongo/db/exec/stagedebug_cmd.cpp | 7 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/db/exec/multi_plan.cpp b/src/mongo/db/exec/multi_plan.cpp index c670dddc02a..2c5bed6c253 100644 --- a/src/mongo/db/exec/multi_plan.cpp +++ b/src/mongo/db/exec/multi_plan.cpp @@ -379,16 +379,17 @@ bool MultiPlanStage::workAllPlans(size_t numResults, PlanYieldPolicy* yieldPolic return false; } } else if (PlanStage::NEED_TIME != state) { - // FAILURE or DEAD. Do we want to just tank that plan and try the rest? We - // probably want to fail globally as this shouldn't happen anyway. + // On FAILURE, mark this candidate as failed, but keep executing the other + // candidates. The MultiPlanStage as a whole only fails when every candidate + // plan fails. candidate.failed = true; ++_failureCount; // Propagate most recent seen failure to parent. - if (PlanStage::FAILURE == state) { - _statusMemberId = id; - } + invariant(state == PlanStage::FAILURE); + _statusMemberId = id; + if (_failureCount == _candidates.size()) { _failure = true; diff --git a/src/mongo/db/exec/stagedebug_cmd.cpp b/src/mongo/db/exec/stagedebug_cmd.cpp index 12a5dd29745..fb3c5d8929f 100644 --- a/src/mongo/db/exec/stagedebug_cmd.cpp +++ b/src/mongo/db/exec/stagedebug_cmd.cpp @@ -207,10 +207,9 @@ public: resultBuilder.done(); - if (PlanExecutor::FAILURE == state || PlanExecutor::DEAD == state) { - error() << "Plan executor error during StageDebug command: " - << PlanExecutor::statestr(state) - << ", stats: " << redact(Explain::getWinningPlanStats(exec.get())); + if (PlanExecutor::FAILURE == state) { + error() << "Plan executor error during StageDebug command: FAILURE, stats: " + << redact(Explain::getWinningPlanStats(exec.get())); uassertStatusOK(WorkingSetCommon::getMemberObjectStatus(obj).withContext( "Executor error during StageDebug command")); |