summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/query_settings.cpp')
-rw-r--r--src/mongo/db/query/query_settings.cpp6
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 cd3e52c2c49..5dd51534581 100644
--- a/src/mongo/db/query/query_settings.cpp
+++ b/src/mongo/db/query/query_settings.cpp
@@ -78,7 +78,7 @@ AllowedIndexEntry::AllowedIndexEntry(const BSONObj& query,
//
boost::optional<AllowedIndicesFilter> QuerySettings::getAllowedIndicesFilter(
- const CanonicalQuery::QueryShapeString& key) const {
+ const PlanCacheKey& key) const {
stdx::lock_guard<stdx::mutex> cacheLock(_mutex);
AllowedIndexEntryMap::const_iterator cacheIter = _allowedIndexEntryMap.find(key);
@@ -100,13 +100,13 @@ std::vector<AllowedIndexEntry> QuerySettings::getAllAllowedIndices() const {
}
void QuerySettings::setAllowedIndices(const CanonicalQuery& canonicalQuery,
+ const PlanCacheKey& key,
const BSONObjSet& indexKeyPatterns,
const stdx::unordered_set<std::string>& indexNames) {
const QueryRequest& qr = canonicalQuery.getQueryRequest();
const BSONObj& query = qr.getFilter();
const BSONObj& sort = qr.getSort();
const BSONObj& projection = qr.getProj();
- const auto key = canonicalQuery.encodeKey();
const BSONObj collation =
canonicalQuery.getCollator() ? canonicalQuery.getCollator()->getSpec().toBSON() : BSONObj();
@@ -118,7 +118,7 @@ void QuerySettings::setAllowedIndices(const CanonicalQuery& canonicalQuery,
std::forward_as_tuple(query, sort, projection, collation, indexKeyPatterns, indexNames));
}
-void QuerySettings::removeAllowedIndices(const CanonicalQuery::QueryShapeString& key) {
+void QuerySettings::removeAllowedIndices(const PlanCacheKey& key) {
stdx::lock_guard<stdx::mutex> cacheLock(_mutex);
AllowedIndexEntryMap::iterator i = _allowedIndexEntryMap.find(key);