diff options
author | Martin Neupauer <martin.neupauer@mongodb.com> | 2020-06-11 08:07:39 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-11 11:17:49 +0000 |
commit | e3948d4d8817579b6b03618e64e1b9e8cc2ef086 (patch) | |
tree | 649bef264a16807b269f7b645a8d2312c4442455 /src/mongo/dbtests/query_stage_cached_plan.cpp | |
parent | 0af9c85d7e2ba60f592f2d7a9a35217e254e59fb (diff) | |
download | mongo-e3948d4d8817579b6b03618e64e1b9e8cc2ef086.tar.gz |
SERVER-48228 Move slot-based execution engine and supporting changes into the master branch
This is an initial commit for the slot-based execution engine (SBE) which contains:
* Implementation of the core slot-based engine.
* The SBE stage builder, which is responsible for translating a QuerySolution tree
into an SBE plan.
* Other changes necessary for integration with the find command.
Co-authored-by: Anton Korshunov <anton.korshunov@mongodb.com>
Co-authored-by: Justin Seyster <justin.seyster@mongodb.com>
Co-authored-by: David Storch <david.storch@mongodb.com>
Diffstat (limited to 'src/mongo/dbtests/query_stage_cached_plan.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_cached_plan.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mongo/dbtests/query_stage_cached_plan.cpp b/src/mongo/dbtests/query_stage_cached_plan.cpp index 87ea3b7e3bd..ba32d9235d6 100644 --- a/src/mongo/dbtests/query_stage_cached_plan.cpp +++ b/src/mongo/dbtests/query_stage_cached_plan.cpp @@ -46,8 +46,8 @@ #include "mongo/db/query/canonical_query.h" #include "mongo/db/query/collection_query_info.h" #include "mongo/db/query/get_executor.h" +#include "mongo/db/query/mock_yield_policies.h" #include "mongo/db/query/plan_cache.h" -#include "mongo/db/query/plan_yield_policy.h" #include "mongo/db/query/query_knobs_gen.h" #include "mongo/db/query/query_planner_params.h" #include "mongo/dbtests/dbtests.h" @@ -164,8 +164,7 @@ public: std::move(mockChild)); // This should succeed after triggering a replan. - PlanYieldPolicy yieldPolicy(PlanExecutor::NO_YIELD, - _opCtx.getServiceContext()->getFastClockSource()); + NoopYieldPolicy yieldPolicy(_opCtx.getServiceContext()->getFastClockSource()); ASSERT_OK(cachedPlanStage.pickBestPlan(&yieldPolicy)); } @@ -220,8 +219,7 @@ TEST_F(QueryStageCachedPlan, QueryStageCachedPlanFailureMemoryLimitExceeded) { std::move(mockChild)); // This should succeed after triggering a replan. - PlanYieldPolicy yieldPolicy(PlanExecutor::NO_YIELD, - _opCtx.getServiceContext()->getFastClockSource()); + NoopYieldPolicy yieldPolicy(_opCtx.getServiceContext()->getFastClockSource()); ASSERT_OK(cachedPlanStage.pickBestPlan(&yieldPolicy)); ASSERT_EQ(getNumResultsForStage(_ws, &cachedPlanStage, cq.get()), 2U); @@ -275,8 +273,7 @@ TEST_F(QueryStageCachedPlan, QueryStageCachedPlanHitMaxWorks) { std::move(mockChild)); // This should succeed after triggering a replan. - PlanYieldPolicy yieldPolicy(PlanExecutor::NO_YIELD, - _opCtx.getServiceContext()->getFastClockSource()); + NoopYieldPolicy yieldPolicy(_opCtx.getServiceContext()->getFastClockSource()); ASSERT_OK(cachedPlanStage.pickBestPlan(&yieldPolicy)); ASSERT_EQ(getNumResultsForStage(_ws, &cachedPlanStage, cq.get()), 2U); @@ -520,8 +517,7 @@ TEST_F(QueryStageCachedPlan, DoesNotThrowOnYieldRecoveryWhenIndexIsDroppedAferPl decisionWorks, std::make_unique<MockStage>(_expCtx.get(), &_ws)); - PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, - _opCtx.getServiceContext()->getFastClockSource()); + NoopYieldPolicy yieldPolicy(_opCtx.getServiceContext()->getFastClockSource()); ASSERT_OK(cachedPlanStage.pickBestPlan(&yieldPolicy)); // Drop an index while the CachedPlanStage is in a saved state. We should be able to restore |