summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/auth/authorization_manager_test.cpp6
-rw-r--r--src/mongo/db/auth/role_name.h2
-rw-r--r--src/mongo/db/auth/user_name_hash.h2
-rw-r--r--src/mongo/db/commands.cpp32
-rw-r--r--src/mongo/db/commands/index_filter_commands.cpp4
-rw-r--r--src/mongo/db/exec/working_set.h4
-rw-r--r--src/mongo/db/matcher/expression_leaf.cpp3
-rw-r--r--src/mongo/db/matcher/expression_leaf.h5
-rw-r--r--src/mongo/db/matcher/expression_parser.cpp2
-rw-r--r--src/mongo/db/pipeline/accumulator.h2
-rw-r--r--src/mongo/db/pipeline/document_source.h2
-rw-r--r--src/mongo/db/pipeline/expression.cpp2
-rw-r--r--src/mongo/db/pipeline/parsed_aggregation_projection.cpp2
-rw-r--r--src/mongo/db/pipeline/parsed_exclusion_projection.h8
-rw-r--r--src/mongo/db/pipeline/parsed_inclusion_projection.h8
-rw-r--r--src/mongo/db/pipeline/value_comparator.h16
-rw-r--r--src/mongo/db/query/expression_index.cpp3
-rw-r--r--src/mongo/db/query/get_executor_test.cpp16
-rw-r--r--src/mongo/db/query/lru_key_value.h9
-rw-r--r--src/mongo/db/query/query_settings.cpp6
-rw-r--r--src/mongo/db/query/query_settings.h10
-rw-r--r--src/mongo/db/s/sharding_state.h4
-rw-r--r--src/mongo/db/views/durable_view_catalog.cpp2
-rw-r--r--src/mongo/db/views/view_graph.h12
24 files changed, 80 insertions, 82 deletions
diff --git a/src/mongo/db/auth/authorization_manager_test.cpp b/src/mongo/db/auth/authorization_manager_test.cpp
index 50fc08e63dd..9e9312d0694 100644
--- a/src/mongo/db/auth/authorization_manager_test.cpp
+++ b/src/mongo/db/auth/authorization_manager_test.cpp
@@ -256,10 +256,10 @@ TEST_F(AuthorizationManagerTest, testLocalX509Authorization) {
authzManager->acquireUser(txn.get(), UserName("CN=mongodb.com", "$external"), &x509User));
ASSERT(x509User->isValid());
- std::unordered_set<RoleName> expectedRoles{RoleName("read", "test"),
- RoleName("readWrite", "test")};
+ stdx::unordered_set<RoleName> expectedRoles{RoleName("read", "test"),
+ RoleName("readWrite", "test")};
RoleNameIterator roles = x509User->getRoles();
- std::unordered_set<RoleName> acquiredRoles;
+ stdx::unordered_set<RoleName> acquiredRoles;
while (roles.more()) {
acquiredRoles.insert(roles.next());
}
diff --git a/src/mongo/db/auth/role_name.h b/src/mongo/db/auth/role_name.h
index 7606b216c02..5d9981cf9dc 100644
--- a/src/mongo/db/auth/role_name.h
+++ b/src/mongo/db/auth/role_name.h
@@ -164,7 +164,7 @@ private:
} // namespace mongo
-// Define hash function for RoleNames so they can be keys in std::unordered_map
+// Define hash function for RoleNames so they can be keys in stdx::unordered_map
MONGO_HASH_NAMESPACE_START
template <>
struct hash<mongo::RoleName> {
diff --git a/src/mongo/db/auth/user_name_hash.h b/src/mongo/db/auth/user_name_hash.h
index 6f38d9ccfda..f4759bf7ad6 100644
--- a/src/mongo/db/auth/user_name_hash.h
+++ b/src/mongo/db/auth/user_name_hash.h
@@ -33,7 +33,7 @@
#include "mongo/platform/hash_namespace.h"
-// Define hash function for UserNames so they can be keys in std::unordered_map
+// Define hash function for UserNames so they can be keys in stdx::unordered_map
MONGO_HASH_NAMESPACE_START
template <>
struct hash<mongo::UserName> {
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp
index bb7bee083ec..f7b526c1f2c 100644
--- a/src/mongo/db/commands.cpp
+++ b/src/mongo/db/commands.cpp
@@ -353,22 +353,22 @@ void Command::generateErrorResponse(OperationContext* txn,
}
namespace {
-const std::unordered_set<std::string> userManagementCommands{"createUser",
- "updateUser",
- "dropUser",
- "dropAllUsersFromDatabase",
- "grantRolesToUser",
- "revokeRolesFromUser",
- "createRole",
- "updateRole",
- "dropRole",
- "dropAllRolesFromDatabase",
- "grantPrivilegesToRole",
- "revokePrivilegesFromRole",
- "grantRolesToRole",
- "revokeRolesFromRole",
- "_mergeAuthzCollections",
- "authSchemaUpgrade"};
+const stdx::unordered_set<std::string> userManagementCommands{"createUser",
+ "updateUser",
+ "dropUser",
+ "dropAllUsersFromDatabase",
+ "grantRolesToUser",
+ "revokeRolesFromUser",
+ "createRole",
+ "updateRole",
+ "dropRole",
+ "dropAllRolesFromDatabase",
+ "grantPrivilegesToRole",
+ "revokePrivilegesFromRole",
+ "grantRolesToRole",
+ "revokeRolesFromRole",
+ "_mergeAuthzCollections",
+ "authSchemaUpgrade"};
} // namespace
bool Command::isUserManagementCommand(const std::string& name) {
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp
index ff315323a73..d9a5c5d900c 100644
--- a/src/mongo/db/commands/index_filter_commands.cpp
+++ b/src/mongo/db/commands/index_filter_commands.cpp
@@ -32,7 +32,6 @@
#include <sstream>
#include <string>
-#include <unordered_set>
#include <vector>
#include "mongo/base/init.h"
@@ -48,6 +47,7 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/expression_parser.h"
#include "mongo/db/matcher/extensions_callback_real.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/log.h"
@@ -366,7 +366,7 @@ Status SetFilter::set(OperationContext* txn,
"required field indexes must contain at least one index");
}
BSONObjSet indexes = SimpleBSONObjComparator::kInstance.makeBSONObjSet();
- std::unordered_set<std::string> indexNames;
+ stdx::unordered_set<std::string> indexNames;
for (vector<BSONElement>::const_iterator i = indexesEltArray.begin();
i != indexesEltArray.end();
++i) {
diff --git a/src/mongo/db/exec/working_set.h b/src/mongo/db/exec/working_set.h
index 8dab9943f3d..5fd9b6d93a2 100644
--- a/src/mongo/db/exec/working_set.h
+++ b/src/mongo/db/exec/working_set.h
@@ -28,7 +28,6 @@
#pragma once
-#include <unordered_set>
#include <vector>
#include "mongo/base/disallow_copying.h"
@@ -36,6 +35,7 @@
#include "mongo/db/record_id.h"
#include "mongo/db/storage/snapshot.h"
#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -161,7 +161,7 @@ private:
WorkingSetID _freeList;
// An insert-only set of WorkingSetIDs that have been flagged for review.
- std::unordered_set<WorkingSetID> _flagged;
+ stdx::unordered_set<WorkingSetID> _flagged;
// Contains ids of WSMs that may need to be adjusted when we next yield.
std::vector<WorkingSetID> _yieldSensitiveIds;
diff --git a/src/mongo/db/matcher/expression_leaf.cpp b/src/mongo/db/matcher/expression_leaf.cpp
index 6ca2d815bc8..90b0cc985dc 100644
--- a/src/mongo/db/matcher/expression_leaf.cpp
+++ b/src/mongo/db/matcher/expression_leaf.cpp
@@ -32,7 +32,6 @@
#include <cmath>
#include <pcrecpp.h>
-#include <unordered_map>
#include "mongo/bson/bsonelement_comparator.h"
#include "mongo/bson/bsonmisc.h"
@@ -406,7 +405,7 @@ bool ExistsMatchExpression::equivalent(const MatchExpression* other) const {
const std::string TypeMatchExpression::kMatchesAllNumbersAlias = "number";
-const std::unordered_map<std::string, BSONType> TypeMatchExpression::typeAliasMap = {
+const stdx::unordered_map<std::string, BSONType> TypeMatchExpression::typeAliasMap = {
{typeName(NumberDouble), NumberDouble},
{typeName(String), String},
{typeName(Object), Object},
diff --git a/src/mongo/db/matcher/expression_leaf.h b/src/mongo/db/matcher/expression_leaf.h
index 62a45c81e9c..26568b20b81 100644
--- a/src/mongo/db/matcher/expression_leaf.h
+++ b/src/mongo/db/matcher/expression_leaf.h
@@ -30,12 +30,11 @@
#pragma once
-#include <unordered_map>
-
#include "mongo/bson/bsonmisc.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/matcher/expression.h"
#include "mongo/stdx/memory.h"
+#include "mongo/stdx/unordered_map.h"
namespace pcrecpp {
class RE;
@@ -405,7 +404,7 @@ private:
class TypeMatchExpression : public MatchExpression {
public:
static const std::string kMatchesAllNumbersAlias;
- static const std::unordered_map<std::string, BSONType> typeAliasMap;
+ static const stdx::unordered_map<std::string, BSONType> typeAliasMap;
TypeMatchExpression() : MatchExpression(TYPE_OPERATOR) {}
diff --git a/src/mongo/db/matcher/expression_parser.cpp b/src/mongo/db/matcher/expression_parser.cpp
index 4c9a49c26aa..8aba94b60fe 100644
--- a/src/mongo/db/matcher/expression_parser.cpp
+++ b/src/mongo/db/matcher/expression_parser.cpp
@@ -661,7 +661,7 @@ StatusWithMatchExpression MatchExpressionParser::_parseType(const char* name,
}
// Search the string-int map for the typeAlias (case-sensitive).
- std::unordered_map<std::string, BSONType>::const_iterator it =
+ stdx::unordered_map<std::string, BSONType>::const_iterator it =
TypeMatchExpression::typeAliasMap.find(typeAlias);
if (it == TypeMatchExpression::typeAliasMap.end()) {
std::stringstream ss;
diff --git a/src/mongo/db/pipeline/accumulator.h b/src/mongo/db/pipeline/accumulator.h
index fa1847fc5ef..e0a2dbdb11a 100644
--- a/src/mongo/db/pipeline/accumulator.h
+++ b/src/mongo/db/pipeline/accumulator.h
@@ -32,7 +32,6 @@
#include <boost/intrusive_ptr.hpp>
#include <boost/optional.hpp>
-#include <unordered_set>
#include <vector>
#include "mongo/base/init.h"
@@ -42,6 +41,7 @@
#include "mongo/db/pipeline/value.h"
#include "mongo/db/pipeline/value_comparator.h"
#include "mongo/stdx/functional.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/summation.h"
namespace mongo {
diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h
index 8599bace9ac..49801200e4b 100644
--- a/src/mongo/db/pipeline/document_source.h
+++ b/src/mongo/db/pipeline/document_source.h
@@ -34,7 +34,6 @@
#include <deque>
#include <list>
#include <string>
-#include <unordered_map>
#include <utility>
#include <vector>
@@ -59,6 +58,7 @@
#include "mongo/db/query/plan_summary_stats.h"
#include "mongo/db/sorter/sorter.h"
#include "mongo/stdx/functional.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/intrusive_counter.h"
namespace mongo {
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp
index 1f7e363df8d..4f4c893fd17 100644
--- a/src/mongo/db/pipeline/expression.cpp
+++ b/src/mongo/db/pipeline/expression.cpp
@@ -1200,7 +1200,7 @@ intrusive_ptr<ExpressionObject> ExpressionObject::create(
intrusive_ptr<ExpressionObject> ExpressionObject::parse(BSONObj obj,
const VariablesParseState& vps) {
// Make sure we don't have any duplicate field names.
- std::unordered_set<string> specifiedFields;
+ stdx::unordered_set<string> specifiedFields;
vector<pair<string, intrusive_ptr<Expression>>> expressions;
for (auto&& elem : obj) {
diff --git a/src/mongo/db/pipeline/parsed_aggregation_projection.cpp b/src/mongo/db/pipeline/parsed_aggregation_projection.cpp
index c0a53c8a23b..a73a9589ed8 100644
--- a/src/mongo/db/pipeline/parsed_aggregation_projection.cpp
+++ b/src/mongo/db/pipeline/parsed_aggregation_projection.cpp
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <string>
-#include <unordered_set>
#include "mongo/bson/bsonelement.h"
#include "mongo/bson/bsonobj.h"
@@ -40,6 +39,7 @@
#include "mongo/db/pipeline/field_path.h"
#include "mongo/db/pipeline/parsed_exclusion_projection.h"
#include "mongo/db/pipeline/parsed_inclusion_projection.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/db/pipeline/parsed_exclusion_projection.h b/src/mongo/db/pipeline/parsed_exclusion_projection.h
index c51ccd754cf..18fb7dc1a60 100644
--- a/src/mongo/db/pipeline/parsed_exclusion_projection.h
+++ b/src/mongo/db/pipeline/parsed_exclusion_projection.h
@@ -30,10 +30,10 @@
#include <memory>
#include <string>
-#include <unordered_map>
-#include <unordered_set>
#include "mongo/db/pipeline/parsed_aggregation_projection.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -81,10 +81,10 @@ private:
Value applyProjectionToValue(Value val) const;
// Fields excluded at this level.
- std::unordered_set<std::string> _excludedFields;
+ stdx::unordered_set<std::string> _excludedFields;
std::string _pathToNode;
- std::unordered_map<std::string, std::unique_ptr<ExclusionNode>> _children;
+ stdx::unordered_map<std::string, std::unique_ptr<ExclusionNode>> _children;
};
/**
diff --git a/src/mongo/db/pipeline/parsed_inclusion_projection.h b/src/mongo/db/pipeline/parsed_inclusion_projection.h
index e72e334f837..eb2bc1877bc 100644
--- a/src/mongo/db/pipeline/parsed_inclusion_projection.h
+++ b/src/mongo/db/pipeline/parsed_inclusion_projection.h
@@ -29,13 +29,13 @@
#pragma once
#include <memory>
-#include <unordered_map>
-#include <unordered_set>
#include "mongo/db/pipeline/expression.h"
#include "mongo/db/pipeline/expression_context.h"
#include "mongo/db/pipeline/parsed_aggregation_projection.h"
#include "mongo/stdx/memory.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -155,10 +155,10 @@ private:
std::vector<std::string> _orderToProcessAdditionsAndChildren;
StringMap<boost::intrusive_ptr<Expression>> _expressions;
- std::unordered_set<std::string> _inclusions;
+ stdx::unordered_set<std::string> _inclusions;
// TODO use StringMap once SERVER-23700 is resolved.
- std::unordered_map<std::string, std::unique_ptr<InclusionNode>> _children;
+ stdx::unordered_map<std::string, std::unique_ptr<InclusionNode>> _children;
};
/**
diff --git a/src/mongo/db/pipeline/value_comparator.h b/src/mongo/db/pipeline/value_comparator.h
index 1e46da52ce9..420ec4c5ae4 100644
--- a/src/mongo/db/pipeline/value_comparator.h
+++ b/src/mongo/db/pipeline/value_comparator.h
@@ -30,11 +30,11 @@
#include <map>
#include <set>
-#include <unordered_map>
-#include <unordered_set>
#include "mongo/base/string_data.h"
#include "mongo/db/pipeline/value.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -160,8 +160,8 @@ public:
* Construct an empty unordered set of Value whose equivalence classes are given by this
* comparator. This comparator must outlive the returned set.
*/
- std::unordered_set<Value, Hasher, EqualTo> makeUnorderedValueSet() const {
- return std::unordered_set<Value, Hasher, EqualTo>(0, Hasher(this), EqualTo(this));
+ stdx::unordered_set<Value, Hasher, EqualTo> makeUnorderedValueSet() const {
+ return stdx::unordered_set<Value, Hasher, EqualTo>(0, Hasher(this), EqualTo(this));
}
/**
@@ -178,8 +178,8 @@ public:
* this comparator. This comparator must outlive the returned set.
*/
template <typename T>
- std::unordered_map<Value, T, Hasher, EqualTo> makeUnorderedValueMap() const {
- return std::unordered_map<Value, T, Hasher, EqualTo>(0, Hasher(this), EqualTo(this));
+ stdx::unordered_map<Value, T, Hasher, EqualTo> makeUnorderedValueMap() const {
+ return stdx::unordered_map<Value, T, Hasher, EqualTo>(0, Hasher(this), EqualTo(this));
}
private:
@@ -193,13 +193,13 @@ private:
using ValueSet = std::set<Value, ValueComparator::LessThan>;
using ValueUnorderedSet =
- std::unordered_set<Value, ValueComparator::Hasher, ValueComparator::EqualTo>;
+ stdx::unordered_set<Value, ValueComparator::Hasher, ValueComparator::EqualTo>;
template <typename T>
using ValueMap = std::map<Value, T, ValueComparator::LessThan>;
template <typename T>
using ValueUnorderedMap =
- std::unordered_map<Value, T, ValueComparator::Hasher, ValueComparator::EqualTo>;
+ stdx::unordered_map<Value, T, ValueComparator::Hasher, ValueComparator::EqualTo>;
} // namespace mongo
diff --git a/src/mongo/db/query/expression_index.cpp b/src/mongo/db/query/expression_index.cpp
index ff24396baeb..45617f35a89 100644
--- a/src/mongo/db/query/expression_index.cpp
+++ b/src/mongo/db/query/expression_index.cpp
@@ -29,6 +29,7 @@
#include "mongo/db/query/expression_index.h"
#include <iostream>
+#include <unordered_set>
#include "mongo/db/geo/geoconstants.h"
#include "mongo/db/geo/r2_region_coverer.h"
@@ -186,7 +187,7 @@ void ExpressionMapping::S2CellIdsToIntervalsWithParents(const std::vector<S2Cell
const S2IndexingParams& indexParams,
OrderedIntervalList* oilOut) {
// There may be duplicates when going up parent cells if two cells share a parent
- std::unordered_set<S2CellId> exactSet;
+ std::unordered_set<S2CellId> exactSet; // NOLINT
for (const S2CellId& interval : intervalSet) {
S2CellId coveredCell = interval;
// Look at the cells that cover us. We want to look at every cell that contains the
diff --git a/src/mongo/db/query/get_executor_test.cpp b/src/mongo/db/query/get_executor_test.cpp
index 1979a178872..a05c8e08e13 100644
--- a/src/mongo/db/query/get_executor_test.cpp
+++ b/src/mongo/db/query/get_executor_test.cpp
@@ -34,13 +34,13 @@
#include <boost/optional.hpp>
#include <string>
-#include <unordered_set>
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/db/json.h"
#include "mongo/db/matcher/extensions_callback_disallow_extensions.h"
#include "mongo/db/query/query_settings.h"
#include "mongo/db/query/query_test_service_context.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/mongoutils/str.h"
@@ -90,8 +90,8 @@ unique_ptr<CanonicalQuery> canonicalize(const char* queryStr,
*/
void testAllowedIndices(std::vector<IndexEntry> indexes,
BSONObjSet keyPatterns,
- std::unordered_set<std::string> indexNames,
- std::unordered_set<std::string> expectedFilteredNames) {
+ stdx::unordered_set<std::string> indexNames,
+ stdx::unordered_set<std::string> expectedFilteredNames) {
PlanCache planCache;
QuerySettings querySettings;
@@ -124,7 +124,7 @@ TEST(GetExecutorTest, GetAllowedIndices) {
IndexEntry(fromjson("{a: 1, b: 1}"), "a_1_b_1"),
IndexEntry(fromjson("{a: 1, c: 1}"), "a_1_c_1")},
SimpleBSONObjComparator::kInstance.makeBSONObjSet({fromjson("{a: 1, b: 1}")}),
- {},
+ stdx::unordered_set<std::string>{},
{"a_1_b_1"});
}
@@ -137,8 +137,8 @@ TEST(GetExecutorTest, GetAllowedIndicesNonExistentIndexKeyPatterns) {
IndexEntry(fromjson("{a: 1, b: 1}"), "a_1_b_1"),
IndexEntry(fromjson("{a: 1, c: 1}"), "a_1_c_1")},
SimpleBSONObjComparator::kInstance.makeBSONObjSet({fromjson("{nosuchfield: 1}")}),
- {},
- {});
+ stdx::unordered_set<std::string>{},
+ stdx::unordered_set<std::string>{});
}
// This test case shows how to force query execution to use
@@ -147,7 +147,7 @@ TEST(GetExecutorTest, GetAllowedIndicesDescendingOrder) {
testAllowedIndices(
{IndexEntry(fromjson("{a: 1}"), "a_1"), IndexEntry(fromjson("{a: -1}"), "a_-1")},
SimpleBSONObjComparator::kInstance.makeBSONObjSet({fromjson("{a: -1}")}),
- {},
+ stdx::unordered_set<std::string>{},
{"a_-1"});
}
@@ -165,7 +165,7 @@ TEST(GetExecutorTest, GetAllowedIndicesMatchesMultipleIndexesByKey) {
testAllowedIndices(
{IndexEntry(fromjson("{a: 1}"), "a_1"), IndexEntry(fromjson("{a: 1}"), "a_1:en")},
SimpleBSONObjComparator::kInstance.makeBSONObjSet({fromjson("{a: 1}")}),
- {},
+ stdx::unordered_set<std::string>{},
{"a_1", "a_1:en"});
}
diff --git a/src/mongo/db/query/lru_key_value.h b/src/mongo/db/query/lru_key_value.h
index ddf17faaef8..bb1918dfe12 100644
--- a/src/mongo/db/query/lru_key_value.h
+++ b/src/mongo/db/query/lru_key_value.h
@@ -30,9 +30,9 @@
#include <list>
#include <memory>
-#include <unordered_map>
#include "mongo/base/status.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/assert_util.h"
namespace mongo {
@@ -47,9 +47,8 @@ namespace mongo {
* for protecting concurrent access to the LRU store if used in a threaded
* context.
*
- * Implemented as a doubly-linked list (std::list) with a hash map
- * (boost::unordered_map) for quickly locating the kv-store entries. The
- * add(), get(), and remove() operations are all O(1).
+ * Implemented as a doubly-linked list with a hash map for quickly locating the kv-store entries.
+ * The add(), get(), and remove() operations are all O(1).
*
* The keys of generic type K map to values of type V*. The V*
* pointers are owned by the kv-store.
@@ -72,7 +71,7 @@ public:
typedef typename KVList::iterator KVListIt;
typedef typename KVList::const_iterator KVListConstIt;
- typedef std::unordered_map<K, KVListIt> KVMap;
+ typedef stdx::unordered_map<K, KVListIt> KVMap;
typedef typename KVMap::const_iterator KVMapConstIt;
/**
diff --git a/src/mongo/db/query/query_settings.cpp b/src/mongo/db/query/query_settings.cpp
index b5b5aa95473..ba4d1e8d616 100644
--- a/src/mongo/db/query/query_settings.cpp
+++ b/src/mongo/db/query/query_settings.cpp
@@ -38,7 +38,7 @@ namespace mongo {
//
AllowedIndicesFilter::AllowedIndicesFilter(const BSONObjSet& indexKeyPatterns,
- const std::unordered_set<std::string>& indexNames)
+ const stdx::unordered_set<std::string>& indexNames)
: indexKeyPatterns(SimpleBSONObjComparator::kInstance.makeBSONObjSet()),
indexNames(indexNames) {
for (BSONObjSet::const_iterator i = indexKeyPatterns.begin(); i != indexKeyPatterns.end();
@@ -57,7 +57,7 @@ AllowedIndexEntry::AllowedIndexEntry(const BSONObj& query,
const BSONObj& projection,
const BSONObj& collation,
const BSONObjSet& indexKeyPatterns,
- const std::unordered_set<std::string>& indexNames)
+ const stdx::unordered_set<std::string>& indexNames)
: query(query.getOwned()),
sort(sort.getOwned()),
projection(projection.getOwned()),
@@ -100,7 +100,7 @@ std::vector<AllowedIndexEntry> QuerySettings::getAllAllowedIndices() const {
void QuerySettings::setAllowedIndices(const CanonicalQuery& canonicalQuery,
const PlanCacheKey& key,
const BSONObjSet& indexKeyPatterns,
- const std::unordered_set<std::string>& indexNames) {
+ const stdx::unordered_set<std::string>& indexNames) {
const QueryRequest& qr = canonicalQuery.getQueryRequest();
const BSONObj& query = qr.getFilter();
const BSONObj& sort = qr.getSort();
diff --git a/src/mongo/db/query/query_settings.h b/src/mongo/db/query/query_settings.h
index ec45629db31..15bd3082f19 100644
--- a/src/mongo/db/query/query_settings.h
+++ b/src/mongo/db/query/query_settings.h
@@ -51,7 +51,7 @@ private:
public:
AllowedIndicesFilter(const BSONObjSet& indexKeyPatterns,
- const std::unordered_set<std::string>& indexNames);
+ const stdx::unordered_set<std::string>& indexNames);
AllowedIndicesFilter(AllowedIndicesFilter&& other) = default;
AllowedIndicesFilter& operator=(AllowedIndicesFilter&& other) = default;
@@ -69,7 +69,7 @@ public:
// we will use to override the indexes retrieved from
// the index catalog.
BSONObjSet indexKeyPatterns;
- std::unordered_set<std::string> indexNames;
+ stdx::unordered_set<std::string> indexNames;
};
/**
@@ -85,7 +85,7 @@ public:
const BSONObj& projection,
const BSONObj& collation,
const BSONObjSet& indexKeyPatterns,
- const std::unordered_set<std::string>& indexNames);
+ const stdx::unordered_set<std::string>& indexNames);
// query, sort, projection, and collation collectively represent the query shape that we are
// storing hint overrides for.
@@ -98,7 +98,7 @@ public:
// we will use to override the indexes retrieved from
// the index catalog.
BSONObjSet indexKeyPatterns;
- std::unordered_set<std::string> indexNames;
+ stdx::unordered_set<std::string> indexNames;
};
/**
@@ -129,7 +129,7 @@ public:
void setAllowedIndices(const CanonicalQuery& canonicalQuery,
const PlanCacheKey& key,
const BSONObjSet& indexKeyPatterns,
- const std::unordered_set<std::string>& indexNames);
+ const stdx::unordered_set<std::string>& indexNames);
/**
* Removes single entry from query settings. No effect if query shape is not found.
diff --git a/src/mongo/db/s/sharding_state.h b/src/mongo/db/s/sharding_state.h
index 26fb65a7a58..d9acc7a7eb9 100644
--- a/src/mongo/db/s/sharding_state.h
+++ b/src/mongo/db/s/sharding_state.h
@@ -29,7 +29,6 @@
#pragma once
#include <string>
-#include <unordered_map>
#include <vector>
#include "mongo/base/disallow_copying.h"
@@ -43,6 +42,7 @@
#include "mongo/stdx/functional.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/concurrency/ticketholder.h"
#include "mongo/util/time_support.h"
@@ -276,7 +276,7 @@ private:
friend class ScopedRegisterMigration;
// Map from a namespace into the sharding state for each collection we have
- typedef std::unordered_map<std::string, std::unique_ptr<CollectionShardingState>>
+ typedef stdx::unordered_map<std::string, std::unique_ptr<CollectionShardingState>>
CollectionShardingStateMap;
// Progress of the sharding state initialization
diff --git a/src/mongo/db/views/durable_view_catalog.cpp b/src/mongo/db/views/durable_view_catalog.cpp
index dde1b922eef..1b597081d50 100644
--- a/src/mongo/db/views/durable_view_catalog.cpp
+++ b/src/mongo/db/views/durable_view_catalog.cpp
@@ -33,7 +33,6 @@
#include "mongo/db/views/durable_view_catalog.h"
#include <string>
-#include <unordered_set>
#include "mongo/db/catalog/collection.h"
#include "mongo/db/catalog/database.h"
@@ -42,6 +41,7 @@
#include "mongo/db/namespace_string.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/record_data.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/log.h"
#include "mongo/util/string_map.h"
diff --git a/src/mongo/db/views/view_graph.h b/src/mongo/db/views/view_graph.h
index 20214444d2c..65b192280ce 100644
--- a/src/mongo/db/views/view_graph.h
+++ b/src/mongo/db/views/view_graph.h
@@ -27,12 +27,12 @@
*/
#pragma once
-#include <unordered_map>
-#include <unordered_set>
#include <vector>
#include "mongo/base/status.h"
#include "mongo/db/namespace_string.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/string_map.h"
namespace mongo {
@@ -87,8 +87,8 @@ private:
struct Node {
// Note, a view may refer to the same child more than once, but we only need to know the
// set of children and parents, since we do not need to traverse duplicates.
- std::unordered_set<uint64_t> parents;
- std::unordered_set<uint64_t> children;
+ stdx::unordered_set<uint64_t> parents;
+ stdx::unordered_set<uint64_t> children;
std::string ns;
};
@@ -98,7 +98,7 @@ private:
int height = 0;
};
- using HeightMap = std::unordered_map<uint64_t, NodeHeight>;
+ using HeightMap = stdx::unordered_map<uint64_t, NodeHeight>;
/**
* Recursively traverses parents of this node and computes their heights. Returns an error
@@ -127,7 +127,7 @@ private:
// Maps node ids to nodes. There is a 1-1 correspondance with _namespaceIds, hence the lifetime
// of a node is the same as the lifetime as its corresponding node id.
- std::unordered_map<uint64_t, Node> _graph;
+ stdx::unordered_map<uint64_t, Node> _graph;
static uint64_t _idCounter;
};
} // namespace mongo