diff options
author | Mihai Andrei <mihai.andrei@10gen.com> | 2022-03-14 13:54:27 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-14 14:30:21 +0000 |
commit | 8ae61492abeacda59fe10d2eafbd5599cc54a313 (patch) | |
tree | e0c5db784574b5dd12cf0bea88aaab434cb75445 /src/mongo/db/query/sbe_cached_solution_planner.cpp | |
parent | 8b9df93c9e47f54e725dfff2f6bda5944e59a459 (diff) | |
download | mongo-8ae61492abeacda59fe10d2eafbd5599cc54a313.tar.gz |
SERVER-63452 Clean up use of 'getMainCollection()'
Diffstat (limited to 'src/mongo/db/query/sbe_cached_solution_planner.cpp')
-rw-r--r-- | src/mongo/db/query/sbe_cached_solution_planner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/query/sbe_cached_solution_planner.cpp b/src/mongo/db/query/sbe_cached_solution_planner.cpp index aea87407908..032033c1454 100644 --- a/src/mongo/db/query/sbe_cached_solution_planner.cpp +++ b/src/mongo/db/query/sbe_cached_solution_planner.cpp @@ -172,10 +172,10 @@ CandidatePlans CachedSolutionPlanner::replan(bool shouldCache, std::string reaso // Therefore, if any of the collection's indexes have been dropped, the query should fail with // a 'QueryPlanKilled' error. _indexExistenceChecker.check(); - const auto& mainColl = _collections.getMainCollection(); if (shouldCache) { // Deactivate the current cache entry. + const auto& mainColl = _collections.getMainCollection(); auto cache = CollectionQueryInfo::get(mainColl).getPlanCache(); cache->deactivate(plan_cache_key_factory::make<mongo::PlanCacheKey>(_cq, mainColl)); } |