diff options
author | David Storch <david.storch@10gen.com> | 2014-06-05 14:29:06 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2014-06-06 11:48:26 -0400 |
commit | 43d2ae25b1872273cb227ada251315cbaf817534 (patch) | |
tree | b9d0358e7753ed60c8bf7f8b09db2fd00eb7ed45 /src/mongo/db/exec/multi_plan.h | |
parent | bf7eda1de3d01005ec61e1414428514b370f93cb (diff) | |
download | mongo-43d2ae25b1872273cb227ada251315cbaf817534.tar.gz |
SERVER-14174 enforce ntoreturn during plan ranking
Diffstat (limited to 'src/mongo/db/exec/multi_plan.h')
-rw-r--r-- | src/mongo/db/exec/multi_plan.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mongo/db/exec/multi_plan.h b/src/mongo/db/exec/multi_plan.h index 8281857518e..359f3381198 100644 --- a/src/mongo/db/exec/multi_plan.h +++ b/src/mongo/db/exec/multi_plan.h @@ -91,13 +91,22 @@ namespace mongo { bool hasBackupPlan() const; private: + // + // Have all our candidate plans do something. + // If all our candidate plans fail, *objOut will contain + // information on the failure. + // + /** - * Have all our candidate plans do something. - * If all our candidate plans fail, *objOut will contain - * information on the failure. + * Calls work on each child plan in a round-robin fashion. We stop when any plan hits EOF + * or returns 'numResults' results. + * + * Returns true if we need to keep working the plans and false otherwise. */ - bool workAllPlans(); + bool workAllPlans(size_t numResults); + void allPlansSaveState(); + void allPlansRestoreState(); static const int kNoSuchPlan = -1; |