summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2016-07-15 09:25:47 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2016-07-15 09:25:47 -0400
commit25c4706ca406196a76dc325b3836f5553148203f (patch)
treec7b6b9de1f403da72c94ee7eced8cb1007537518 /src/mongo/db/query
parentc3d0144eba384f8d33d49f571810b921312a41c0 (diff)
downloadmongo-25c4706ca406196a76dc325b3836f5553148203f.tar.gz
SERVER-24761 Abort entire query plan when a catalog operation occurs.
Plan execution cannot proceed if the collection or a candidate index was dropped during a yield. This prevents the subplanner from trying to build plan stages when the collection and indexes no longer exist. (cherry picked from commit a7e0e028e73c0b4f543c1ded1f4af0673630617a)
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/plan_executor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/query/plan_executor.h b/src/mongo/db/query/plan_executor.h
index 4d91e279e6e..3540c087414 100644
--- a/src/mongo/db/query/plan_executor.h
+++ b/src/mongo/db/query/plan_executor.h
@@ -423,6 +423,10 @@ private:
* this calls into their underlying plan selection facilities. Otherwise, does nothing.
*
* If a YIELD_AUTO policy is set then locks are yielded during plan selection.
+ *
+ * Returns a non-OK status if query planning fails. In particular, this function returns
+ * ErrorCodes::QueryPlanKilled if plan execution cannot proceed due to a concurrent write or
+ * catalog operation.
*/
Status pickBestPlan(YieldPolicy policy);