summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/plan_ranker.h
diff options
context:
space:
mode:
authorMaddie Zechar <mez2113@columbia.edu>2022-10-10 16:22:03 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-10 17:16:27 +0000
commitdbd868972c766d7a272e7cb3fcd2f3c792b2dd83 (patch)
tree03784fb830fc1005ff41b5f846f0715794309ccc /src/mongo/db/query/plan_ranker.h
parentdf498b17710f364a853c4dc1731cbdc6ec91e0f5 (diff)
downloadmongo-dbd868972c766d7a272e7cb3fcd2f3c792b2dd83.tar.gz
SERVER-64978 Add metrics to track if a plan was recovered from the plan cache
Diffstat (limited to 'src/mongo/db/query/plan_ranker.h')
-rw-r--r--src/mongo/db/query/plan_ranker.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/query/plan_ranker.h b/src/mongo/db/query/plan_ranker.h
index 8a6a2c18ad9..d456aa69d31 100644
--- a/src/mongo/db/query/plan_ranker.h
+++ b/src/mongo/db/query/plan_ranker.h
@@ -189,6 +189,8 @@ struct BaseCandidatePlan {
// If the candidate plan has failed in a recoverable fashion during the trial run, contains a
// non-OK status.
Status status{Status::OK()};
+ // Indicates whether this candidate plan was retrieved from the cache.
+ bool isCachedCandidate{false};
// Any results produced during the plan's execution prior to scoring are retained here.
std::deque<ResultType> results;
// This is used to track the original plan with clean PlanStage tree and the auxiliary data.