diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-04-06 10:05:56 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-08 21:33:40 +0000 |
commit | 6ef4109428abf1afe7ee73d42155d20cf1966fc0 (patch) | |
tree | e80d4aa1bfe76b9eea600e82b71bb008d82a37ad /src/mongo/db/index/expression_keys_private.cpp | |
parent | f79261579283f48d186925e7e9450917a8622e5c (diff) | |
download | mongo-6ef4109428abf1afe7ee73d42155d20cf1966fc0.tar.gz |
SERVER-47349 Use flat_set instead of set for KeyStringSet and MultikeyPaths
So we can reduce the amount of small memory allocations and re-use allocated memory.
Diffstat (limited to 'src/mongo/db/index/expression_keys_private.cpp')
-rw-r--r-- | src/mongo/db/index/expression_keys_private.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/index/expression_keys_private.cpp b/src/mongo/db/index/expression_keys_private.cpp index ce38e6d0092..b0e1570dd7c 100644 --- a/src/mongo/db/index/expression_keys_private.cpp +++ b/src/mongo/db/index/expression_keys_private.cpp @@ -555,7 +555,7 @@ void ExpressionKeysPrivate::getS2Keys(const BSONObj& obj, // the value of the field, or they're transformed if the field is geo. BSONElementSet fieldElements; const bool expandArrayOnTrailingField = false; - std::set<size_t>* arrayComponents = multikeyPaths ? &(*multikeyPaths)[posInIdx] : nullptr; + MultikeyComponents* arrayComponents = multikeyPaths ? &(*multikeyPaths)[posInIdx] : nullptr; dps::extractAllElementsAlongPath( obj, keyElem.fieldName(), fieldElements, expandArrayOnTrailingField, arrayComponents); |