summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/explain.cpp
diff options
context:
space:
mode:
authorAlexander Ignatyev <alexander.ignatyev@mongodb.com>2021-11-03 13:34:30 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-03 14:17:31 +0000
commitaebaaf20a7dea071770976aed8533f011c722b8c (patch)
treecea93e4b21410c5e1186af1d8349afd5b6a33623 /src/mongo/db/query/explain.cpp
parent14cd3f8d8d89a2bdc33374f80ed04d1e326f8fc6 (diff)
downloadmongo-aebaaf20a7dea071770976aed8533f011c722b8c.tar.gz
SERVER-60066 Remove plan cache entries on collection drop
Diffstat (limited to 'src/mongo/db/query/explain.cpp')
-rw-r--r--src/mongo/db/query/explain.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/query/explain.cpp b/src/mongo/db/query/explain.cpp
index f1d75379be6..31ded552406 100644
--- a/src/mongo/db/query/explain.cpp
+++ b/src/mongo/db/query/explain.cpp
@@ -94,13 +94,13 @@ void generatePlannerInfo(PlanExecutor* exec,
if (collection && exec->getCanonicalQuery()) {
const QuerySettings* querySettings =
QuerySettingsDecoration::get(collection->getSharedDecorations());
- const PlanCacheKey planCacheKey =
- plan_cache_key_factory::make(*exec->getCanonicalQuery(), collection);
- planCacheKeyHash = planCacheKey.planCacheKeyHash();
- queryHash = planCacheKey.queryHash();
+ const auto planCacheKeyInfo =
+ plan_cache_key_factory::make<PlanCacheKey>(*exec->getCanonicalQuery(), collection);
+ planCacheKeyHash = planCacheKeyInfo.planCacheKeyHash();
+ queryHash = planCacheKeyInfo.queryHash();
if (auto allowedIndicesFilter =
- querySettings->getAllowedIndicesFilter(planCacheKey.getQueryShape())) {
+ querySettings->getAllowedIndicesFilter(planCacheKeyInfo.getQueryShape())) {
// Found an index filter set on the query shape.
indexFilterSet = true;
}