summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/index_filter_commands.cpp
diff options
context:
space:
mode:
authorIan Boros <ian.boros@10gen.com>2018-10-09 12:22:08 -0400
committerIan Boros <ian.boros@10gen.com>2018-11-06 11:24:25 -0500
commit36d4668e854d8bd17e8b684dbbf42b3b0903bbe7 (patch)
tree4815a0b5a9b712c5fb93f59e6a57d4cd6f0ae2f7 /src/mongo/db/commands/index_filter_commands.cpp
parenta090ee789498e709eef4c2d28bc1326070c1e67a (diff)
downloadmongo-36d4668e854d8bd17e8b684dbbf42b3b0903bbe7.tar.gz
SERVER-33303 Add stable plan cache key and use for index filters
Diffstat (limited to 'src/mongo/db/commands/index_filter_commands.cpp')
-rw-r--r--src/mongo/db/commands/index_filter_commands.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp
index c9aec6823f9..f23760a4631 100644
--- a/src/mongo/db/commands/index_filter_commands.cpp
+++ b/src/mongo/db/commands/index_filter_commands.cpp
@@ -262,7 +262,7 @@ Status ClearFilters::clear(OperationContext* opCtx,
}
unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue());
- querySettings->removeAllowedIndices(planCache->computeKey(*cq));
+ querySettings->removeAllowedIndices(cq->encodeKey());
// Remove entry from plan cache
planCache->remove(*cq).transitional_ignore();
@@ -395,7 +395,7 @@ Status SetFilter::set(OperationContext* opCtx,
unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue());
// Add allowed indices to query settings, overriding any previous entries.
- querySettings->setAllowedIndices(*cq, planCache->computeKey(*cq), indexes, indexNames);
+ querySettings->setAllowedIndices(*cq, indexes, indexNames);
// Remove entry from plan cache.
planCache->remove(*cq).transitional_ignore();