summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/subplan.cpp
diff options
context:
space:
mode:
authorJames Wahlin <james@mongodb.com>2018-07-20 09:05:04 -0400
committerJames Wahlin <james@mongodb.com>2018-07-24 13:09:41 -0400
commit35528523c00b72a210dc5b78a427d90ed1c14331 (patch)
treee666ffa680ffc39ca0bdbce323ac2fb116dedf6a /src/mongo/db/exec/subplan.cpp
parent9175c4deba82dc35606d14428d1bf0d8b43d7a6c (diff)
downloadmongo-35528523c00b72a210dc5b78a427d90ed1c14331.tar.gz
SERVER-35031 Return MaxTimeMSExpired for maxTimeMS timeout
Adds a new 'MaxTimeMSExpired' error code, returned when a timeout occurs due to exceeding of maxTimeMS. Timeouts unrelated to maxTimeMS will continue to return 'ExceededTimeLimit'.
Diffstat (limited to 'src/mongo/db/exec/subplan.cpp')
-rw-r--r--src/mongo/db/exec/subplan.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/mongo/db/exec/subplan.cpp b/src/mongo/db/exec/subplan.cpp
index 41780eab96c..860adc4af20 100644
--- a/src/mongo/db/exec/subplan.cpp
+++ b/src/mongo/db/exec/subplan.cpp
@@ -428,13 +428,6 @@ Status SubplanStage::pickBestPlan(PlanYieldPolicy* yieldPolicy) {
// Plan each branch of the $or.
Status subplanningStatus = planSubqueries();
if (!subplanningStatus.isOK()) {
- if (subplanningStatus == ErrorCodes::QueryPlanKilled ||
- subplanningStatus == ErrorCodes::ExceededTimeLimit) {
- // Query planning cannot continue if the plan for one of the subqueries was killed
- // because the collection or a candidate index may have been dropped, or if we've
- // exceeded the operation's time limit.
- return subplanningStatus;
- }
return choosePlanWholeQuery(yieldPolicy);
}
@@ -443,7 +436,7 @@ Status SubplanStage::pickBestPlan(PlanYieldPolicy* yieldPolicy) {
Status subplanSelectStat = choosePlanForSubqueries(yieldPolicy);
if (!subplanSelectStat.isOK()) {
if (subplanSelectStat == ErrorCodes::QueryPlanKilled ||
- subplanSelectStat == ErrorCodes::ExceededTimeLimit) {
+ subplanSelectStat == ErrorCodes::MaxTimeMSExpired) {
// Query planning cannot continue if the plan for one of the subqueries was killed
// because the collection or a candidate index may have been dropped, or if we've
// exceeded the operation's time limit.