diff options
author | Anton Korshunov <anton.korshunov@mongodb.com> | 2022-07-24 21:45:50 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-24 22:15:17 +0000 |
commit | 7dc67174c9025012ddadfa224f7a0b1bbc2f91a7 (patch) | |
tree | 592e044d25f9e0fb7f008d4381dcc8a4234d39f1 /src/mongo/db/query/query_settings.cpp | |
parent | 4e2b9c4b8f62f81145483db734b778115a4784e1 (diff) | |
download | mongo-7dc67174c9025012ddadfa224f7a0b1bbc2f91a7.tar.gz |
SERVER-66937 Ensure $lookup plan cache interact correctly with plan cache commands
Diffstat (limited to 'src/mongo/db/query/query_settings.cpp')
-rw-r--r-- | src/mongo/db/query/query_settings.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/query/query_settings.cpp b/src/mongo/db/query/query_settings.cpp index b079cfb5a3f..2f376e2822f 100644 --- a/src/mongo/db/query/query_settings.cpp +++ b/src/mongo/db/query/query_settings.cpp @@ -77,7 +77,7 @@ AllowedIndexEntry::AllowedIndexEntry(const BSONObj& query, // boost::optional<AllowedIndicesFilter> QuerySettings::getAllowedIndicesFilter( - const CanonicalQuery::IndexFilterKey& key) const { + const CanonicalQuery::PlanCacheCommandKey& key) const { stdx::lock_guard<Latch> cacheLock(_mutex); AllowedIndexEntryMap::const_iterator cacheIter = _allowedIndexEntryMap.find(key); @@ -105,7 +105,7 @@ void QuerySettings::setAllowedIndices(const CanonicalQuery& canonicalQuery, const BSONObj& query = findCommand.getFilter(); const BSONObj& sort = findCommand.getSort(); const BSONObj& projection = findCommand.getProjection(); - const auto key = canonicalQuery.encodeKeyForIndexFilters(); + const auto key = canonicalQuery.encodeKeyForPlanCacheCommand(); const BSONObj collation = canonicalQuery.getCollator() ? canonicalQuery.getCollator()->getSpec().toBSON() : BSONObj(); @@ -117,7 +117,7 @@ void QuerySettings::setAllowedIndices(const CanonicalQuery& canonicalQuery, std::forward_as_tuple(query, sort, projection, collation, indexKeyPatterns, indexNames)); } -void QuerySettings::removeAllowedIndices(const CanonicalQuery::IndexFilterKey& key) { +void QuerySettings::removeAllowedIndices(const CanonicalQuery::PlanCacheCommandKey& key) { stdx::lock_guard<Latch> cacheLock(_mutex); AllowedIndexEntryMap::iterator i = _allowedIndexEntryMap.find(key); |