diff options
author | Ian Boros <ian.boros@10gen.com> | 2018-05-14 18:47:40 -0400 |
---|---|---|
committer | Ian Boros <ian.boros@10gen.com> | 2018-06-14 11:24:23 -0400 |
commit | 2a66542157d5eac9ad43c749f3531bd57097cd26 (patch) | |
tree | d553675b5e69d3baca258c630c892e1f254e4c4f /src/mongo/db/commands/index_filter_commands_test.cpp | |
parent | 208deb2a3652b5c055b988d4585aef4c98e0c4af (diff) | |
download | mongo-2a66542157d5eac9ad43c749f3531bd57097cd26.tar.gz |
SERVER-32452 add ability for plan cache entries to be inactive
Diffstat (limited to 'src/mongo/db/commands/index_filter_commands_test.cpp')
-rw-r--r-- | src/mongo/db/commands/index_filter_commands_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/commands/index_filter_commands_test.cpp b/src/mongo/db/commands/index_filter_commands_test.cpp index da0b0b919d0..46423af1ed3 100644 --- a/src/mongo/db/commands/index_filter_commands_test.cpp +++ b/src/mongo/db/commands/index_filter_commands_test.cpp @@ -103,7 +103,7 @@ vector<BSONObj> getFilters(const QuerySettings& querySettings) { /** * Utility function to create a PlanRankingDecision */ -PlanRankingDecision* createDecision(size_t numPlans) { +std::unique_ptr<PlanRankingDecision> createDecision(size_t numPlans) { unique_ptr<PlanRankingDecision> why(new PlanRankingDecision()); for (size_t i = 0; i < numPlans; ++i) { CommonStats common("COLLSCAN"); @@ -113,7 +113,7 @@ PlanRankingDecision* createDecision(size_t numPlans) { why->scores.push_back(0U); why->candidateOrder.push_back(i); } - return why.release(); + return why; } /** @@ -140,7 +140,7 @@ void addQueryShapeToPlanCache(OperationContext* opCtx, qs.cacheData->tree.reset(new PlanCacheIndexTree()); std::vector<QuerySolution*> solns; solns.push_back(&qs); - ASSERT_OK(planCache->add(*cq, + ASSERT_OK(planCache->set(*cq, solns, createDecision(1U), opCtx->getServiceContext()->getPreciseClockSource()->now())); |