summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/plan_cache_commands_test.cpp
diff options
context:
space:
mode:
authorArun Banala <arun.banala@10gen.com>2019-10-02 15:27:39 +0000
committerevergreen <evergreen@mongodb.com>2019-10-02 15:27:39 +0000
commitbda366f0b0e432ca143bc41da54d8732bd8d03c0 (patch)
tree43b09749ba831ad5f26bf0f8af636cfcb24e2fb4 /src/mongo/db/commands/plan_cache_commands_test.cpp
parenta9674251a5f0fc9785d787f3f7922312c37d4a04 (diff)
downloadmongo-r4.0.13.tar.gz
SERVER-40382 Add a serverStatus metric to report plan cache memory consumptionr4.0.13-rc0r4.0.13
(cherry picked from commit 5105fa2377d3e86b2011691d5acbd8c531113929) (cherry picked from commit 5eeba7b2c9dda32a37c2c16ca14edd9a9099a996)
Diffstat (limited to 'src/mongo/db/commands/plan_cache_commands_test.cpp')
-rw-r--r--src/mongo/db/commands/plan_cache_commands_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/plan_cache_commands_test.cpp b/src/mongo/db/commands/plan_cache_commands_test.cpp
index 174b64abbb9..09bb15e1abe 100644
--- a/src/mongo/db/commands/plan_cache_commands_test.cpp
+++ b/src/mongo/db/commands/plan_cache_commands_test.cpp
@@ -114,7 +114,7 @@ SolutionCacheData* createSolutionCacheData() {
/**
* 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");
@@ -124,7 +124,7 @@ PlanRankingDecision* createDecision(size_t numPlans) {
why->scores.push_back(0U);
why->candidateOrder.push_back(i);
}
- return why.release();
+ return why;
}
TEST(PlanCacheCommandsTest, planCacheListQueryShapesEmpty) {