From 43d2ae25b1872273cb227ada251315cbaf817534 Mon Sep 17 00:00:00 2001 From: David Storch Date: Thu, 5 Jun 2014 14:29:06 -0400 Subject: SERVER-14174 enforce ntoreturn during plan ranking --- src/mongo/db/exec/multi_plan.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/mongo/db/exec/multi_plan.h') 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; -- cgit v1.2.1