diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2023-04-09 23:31:40 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-10 00:08:41 +0000 |
commit | a37946ca13ae1d1bab79b8e47fd9d70d2ee0cf27 (patch) | |
tree | 59c04f6418b70ec905a4276b95ffa8570165d05a /src | |
parent | c88c5dd8a49a276abc5d36018bbff9a72e7cb500 (diff) | |
download | mongo-a37946ca13ae1d1bab79b8e47fd9d70d2ee0cf27.tar.gz |
SERVER-75849 updateReplicaSetOnConfigServer should not skip config server
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/s/client/shard_registry.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mongo/s/client/shard_registry.cpp b/src/mongo/s/client/shard_registry.cpp index fa33c528dd1..e68c1985a9a 100644 --- a/src/mongo/s/client/shard_registry.cpp +++ b/src/mongo/s/client/shard_registry.cpp @@ -466,15 +466,6 @@ void ShardRegistry::updateReplicaSetOnConfigServer(ServiceContext* serviceContex auto const grid = Grid::get(opCtx.get()); auto sr = grid->shardRegistry(); - // First check if this is a config shard lookup. - { - stdx::lock_guard<Latch> lk(sr->_mutex); - if (auto shard = sr->_configShardData.findByRSName(connStr.getSetName())) { - // No need to tell the config servers their own connection string. - return; - } - } - auto swRegistryData = sr->_getDataAsync().getNoThrow(opCtx.get()); if (!swRegistryData.isOK()) { LOGV2_DEBUG( @@ -500,7 +491,7 @@ void ShardRegistry::updateReplicaSetOnConfigServer(ServiceContext* serviceContex NamespaceString::kConfigsvrShardsNamespace, BSON(ShardType::name(shard->getId().toString())), BSON("$set" << BSON(ShardType::host(connStr.toString()))), - false, + false /* upsert */, ShardingCatalogClient::kMajorityWriteConcern); auto status = swWasUpdated.getStatus(); if (!status.isOK()) { |