diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-06-10 01:21:01 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-06-10 01:59:35 -0400 |
commit | c36f9ecb91e49da7e637863889804fc4e6c6c05e (patch) | |
tree | 64d8aadb6d29042d4f4e7366bc1457e4e0612383 /src/mongo/dbtests/query_stage_cached_plan.cpp | |
parent | c9548e729c8fecd9d7a9a5dd341da0433194ac73 (diff) | |
download | mongo-c36f9ecb91e49da7e637863889804fc4e6c6c05e.tar.gz |
SERVER-39339 Remove `stdx/memory.h`
Diffstat (limited to 'src/mongo/dbtests/query_stage_cached_plan.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_cached_plan.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mongo/dbtests/query_stage_cached_plan.cpp b/src/mongo/dbtests/query_stage_cached_plan.cpp index 6b617565423..49f6d6429cc 100644 --- a/src/mongo/dbtests/query_stage_cached_plan.cpp +++ b/src/mongo/dbtests/query_stage_cached_plan.cpp @@ -29,6 +29,8 @@ #include "mongo/platform/basic.h" +#include <memory> + #include "mongo/bson/bsonobjbuilder.h" #include "mongo/db/catalog/collection.h" #include "mongo/db/catalog/database.h" @@ -48,7 +50,6 @@ #include "mongo/db/query/query_knobs_gen.h" #include "mongo/db/query/query_planner_params.h" #include "mongo/dbtests/dbtests.h" -#include "mongo/stdx/memory.h" namespace QueryStageCachedPlan { @@ -58,7 +59,7 @@ namespace { std::unique_ptr<CanonicalQuery> canonicalQueryFromFilterObj(OperationContext* opCtx, const NamespaceString& nss, BSONObj filter) { - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(filter); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx, std::move(qr)); uassertStatusOK(statusWithCQ.getStatus()); @@ -150,7 +151,7 @@ public: const size_t decisionWorks = 10; const size_t mockWorks = 1U + static_cast<size_t>(internalQueryCacheEvictionRatio * decisionWorks); - auto mockChild = stdx::make_unique<QueuedDataStage>(&_opCtx, &_ws); + auto mockChild = std::make_unique<QueuedDataStage>(&_opCtx, &_ws); for (size_t i = 0; i < mockWorks; i++) { mockChild->pushBack(PlanStage::NEED_TIME); } @@ -181,7 +182,7 @@ TEST_F(QueryStageCachedPlan, QueryStageCachedPlanFailure) { ASSERT(collection); // Query can be answered by either index on "a" or index on "b". - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: {$gte: 8}, b: 1}")); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); @@ -197,7 +198,7 @@ TEST_F(QueryStageCachedPlan, QueryStageCachedPlanFailure) { fillOutPlannerParams(&_opCtx, collection, cq.get(), &plannerParams); // Queued data stage will return a failure during the cached plan trial period. - auto mockChild = stdx::make_unique<QueuedDataStage>(&_opCtx, &_ws); + auto mockChild = std::make_unique<QueuedDataStage>(&_opCtx, &_ws); mockChild->pushBack(PlanStage::FAILURE); // High enough so that we shouldn't trigger a replan based on works. @@ -227,7 +228,7 @@ TEST_F(QueryStageCachedPlan, QueryStageCachedPlanHitMaxWorks) { ASSERT(collection); // Query can be answered by either index on "a" or index on "b". - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: {$gte: 8}, b: 1}")); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); @@ -247,7 +248,7 @@ TEST_F(QueryStageCachedPlan, QueryStageCachedPlanHitMaxWorks) { const size_t decisionWorks = 10; const size_t mockWorks = 1U + static_cast<size_t>(internalQueryCacheEvictionRatio * decisionWorks); - auto mockChild = stdx::make_unique<QueuedDataStage>(&_opCtx, &_ws); + auto mockChild = std::make_unique<QueuedDataStage>(&_opCtx, &_ws); for (size_t i = 0; i < mockWorks; i++) { mockChild->pushBack(PlanStage::NEED_TIME); } @@ -437,7 +438,7 @@ TEST_F(QueryStageCachedPlan, ThrowsOnYieldRecoveryWhenIndexIsDroppedBeforePlanSe ASSERT(collection); // Query can be answered by either index on "a" or index on "b". - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); const std::unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue()); @@ -479,7 +480,7 @@ TEST_F(QueryStageCachedPlan, DoesNotThrowOnYieldRecoveryWhenIndexIsDroppedAferPl ASSERT(collection); // Query can be answered by either index on "a" or index on "b". - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); const std::unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue()); |