From d295b6646fcc815e73ad3085b212ad14c8c6de01 Mon Sep 17 00:00:00 2001 From: David Storch Date: Mon, 18 May 2020 18:20:48 -0400 Subject: SERVER-43821 Make PlanStage and PlanExecutor return errors by throwing This eliminates the need for the FAILURE status codes in PlanStage and PlanExecutor, and brings query execution's error reporting more in line with that of the rest of the server. It also makes it easier for future implementations of PlanExecutor to comply with the interface. --- src/mongo/db/exec/text_or.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/mongo/db/exec/text_or.cpp') diff --git a/src/mongo/db/exec/text_or.cpp b/src/mongo/db/exec/text_or.cpp index 4f92025575a..75e90e278cc 100644 --- a/src/mongo/db/exec/text_or.cpp +++ b/src/mongo/db/exec/text_or.cpp @@ -197,19 +197,6 @@ PlanStage::StageState TextOrStage::readFromChildren(WorkingSetID* out) { _internalState = State::kReturningResults; return PlanStage::NEED_TIME; - } else if (PlanStage::FAILURE == childState) { - // If a stage fails, it may create a status WSM to indicate why it - // failed, in which case 'id' is valid. If ID is invalid, we - // create our own error message. - if (WorkingSet::INVALID_ID == id) { - str::stream ss; - ss << "TEXT_OR stage failed to read in results from child"; - Status status(ErrorCodes::InternalError, ss); - *out = WorkingSetCommon::allocateStatusMember(_ws, status); - } else { - *out = id; - } - return PlanStage::FAILURE; } else { // Propagate WSID from below. *out = id; -- cgit v1.2.1