diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2022-12-20 21:31:18 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-21 00:20:57 +0000 |
commit | d1500aed6baa47ca511692c5ca326321c80cd50d (patch) | |
tree | 54789abf914b3038cea7ad40f5f37d52571f678e /src/mongo/db/mongod_main.cpp | |
parent | 22d2a4696c86a42662a86752a63fdb4ed9686ff7 (diff) | |
download | mongo-d1500aed6baa47ca511692c5ca326321c80cd50d.tar.gz |
SERVER-72088 Use ShardRemote for config shard in ShardRegistry
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index afd65cb1266..062624f2d9f 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -137,7 +137,6 @@ #include "mongo/db/s/collection_sharding_state_factory_shard.h" #include "mongo/db/s/collection_sharding_state_factory_standalone.h" #include "mongo/db/s/config/configsvr_coordinator_service.h" -#include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/db/s/config_server_op_observer.h" #include "mongo/db/s/migration_util.h" #include "mongo/db/s/op_observer_sharding_impl.h" @@ -740,23 +739,7 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { } if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer) { - initializeGlobalShardingStateForMongoD( - startupOpCtx.get(), ShardId::kConfigServerId, ConnectionString::forLocal()); - - // ShardLocal to use for explicitly local commands on the config server. - auto localConfigShard = - Grid::get(serviceContext)->shardRegistry()->createLocalConfigShard(); - auto localCatalogClient = std::make_unique<ShardingCatalogClientImpl>(localConfigShard); - - ShardingCatalogManager::create( - startupOpCtx->getServiceContext(), - makeShardingTaskExecutor(executor::makeNetworkInterface("AddShard-TaskExecutor")), - std::move(localConfigShard), - std::move(localCatalogClient)); - - if (!gFeatureFlagCatalogShard.isEnabledAndIgnoreFCV()) { - Grid::get(startupOpCtx.get())->setShardingInitialized(); - } + initializeGlobalShardingStateForConfigServer(startupOpCtx.get()); } if (serverGlobalParams.clusterRole == ClusterRole::None && |