diff options
Diffstat (limited to 'src/mongo/s/client')
-rw-r--r-- | src/mongo/s/client/shard_registry.cpp | 10 | ||||
-rw-r--r-- | src/mongo/s/client/sharding_connection_hook.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/s/client/shard_registry.cpp b/src/mongo/s/client/shard_registry.cpp index b19f5d7d77b..4bb4e11a2c0 100644 --- a/src/mongo/s/client/shard_registry.cpp +++ b/src/mongo/s/client/shard_registry.cpp @@ -383,8 +383,8 @@ void ShardRegistry::_removeReplicaSet(const std::string& setName) { void ShardRegistry::updateReplSetHosts(const ConnectionString& givenConnString, ConnectionStringUpdateType updateType) { - invariant(givenConnString.type() == ConnectionString::SET || - givenConnString.type() == ConnectionString::CUSTOM); // For dbtests + invariant(givenConnString.type() == ConnectionString::ConnectionType::kReplicaSet || + givenConnString.type() == ConnectionString::ConnectionType::kCustom); // For dbtests auto setName = givenConnString.getSetName(); @@ -830,10 +830,10 @@ void ShardRegistryData::_addShard(std::shared_ptr<Shard> shard) { "Adding new shard to shard registry", "shardId"_attr = shard->getId(), "shardConnectionString"_attr = connString); - if (connString.type() == ConnectionString::SET) { + if (connString.type() == ConnectionString::ConnectionType::kReplicaSet) { _rsLookup[connString.getSetName()] = shard; - } else if (connString.type() == ConnectionString::CUSTOM) { - // CUSTOM connection strings (ie "$dummy:10000) become DBDirectClient connections which + } else if (connString.type() == ConnectionString::ConnectionType::kCustom) { + // kCustom connection strings (ie "$dummy:10000) become DBDirectClient connections which // always return "localhost" as their response to getServerAddress(). This is just for // making dbtest work. _shardIdLookup[ShardId("localhost")] = shard; diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp index 3d153a8012b..0a7374a240e 100644 --- a/src/mongo/s/client/sharding_connection_hook.cpp +++ b/src/mongo/s/client/sharding_connection_hook.cpp @@ -49,7 +49,7 @@ ShardingConnectionHook::ShardingConnectionHook(std::unique_ptr<rpc::EgressMetada : _egressHook(std::move(egressHook)) {} void ShardingConnectionHook::onCreate(DBClientBase* conn) { - if (conn->type() == ConnectionString::INVALID) { + if (conn->type() == ConnectionString::ConnectionType::kInvalid) { uasserted(ErrorCodes::BadValue, str::stream() << "Unrecognized connection string."); } @@ -72,7 +72,7 @@ void ShardingConnectionHook::onCreate(DBClientBase* conn) { }); - if (conn->type() == ConnectionString::MASTER) { + if (conn->type() == ConnectionString::ConnectionType::kStandalone) { BSONObj isMasterResponse; if (!conn->runCommand("admin", BSON("ismaster" << 1), isMasterResponse)) { uassertStatusOK(getStatusFromCommandResult(isMasterResponse)); |