diff options
author | joshua <80741223+jlap199@users.noreply.github.com> | 2021-10-28 21:01:10 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-28 21:45:55 +0000 |
commit | cd6a70b2343a9ba10ba36b6ba66518f60d26bf81 (patch) | |
tree | 2d9a03d0cf29719f0322b905fd8fc1935107706c /src/mongo/db/query/lru_key_value.h | |
parent | 0a6e28a2e71b5542768e1a7eed18238bce8ed592 (diff) | |
download | mongo-cd6a70b2343a9ba10ba36b6ba66518f60d26bf81.tar.gz |
SERVER-59680 Partition the plan cache
Diffstat (limited to 'src/mongo/db/query/lru_key_value.h')
-rw-r--r-- | src/mongo/db/query/lru_key_value.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/query/lru_key_value.h b/src/mongo/db/query/lru_key_value.h index 4aeea8e6921..489d0f43791 100644 --- a/src/mongo/db/query/lru_key_value.h +++ b/src/mongo/db/query/lru_key_value.h @@ -123,6 +123,11 @@ public: typedef stdx::unordered_map<K, KVListIt, KeyHasher> KVMap; typedef typename KVMap::const_iterator KVMapConstIt; + // These type declarations are required by the 'Partitioned' utility. + using key_type = typename KVMap::key_type; + using mapped_type = typename KVMap::mapped_type; + using value_type = typename KVMap::value_type; + /** * Add an (K, V*) pair to the store, where 'key' can be used to retrieve value 'entry' from the * store. Takes ownership of 'entry'. If 'key' already exists in the kv-store, 'entry' will @@ -174,7 +179,7 @@ public: * Remove the kv-store entry keyed by 'key'. * Returns false if there doesn't exist such 'key', otherwise returns true. */ - bool remove(const K& key) { + bool erase(const K& key) { KVMapConstIt i = _kvMap.find(key); if (i == _kvMap.end()) { return false; |