summaryrefslogtreecommitdiff
path: root/src/mongo/db/s
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2015-07-14 18:33:39 -0400
committerSpencer T Brody <spencer@mongodb.com>2015-07-16 11:37:38 -0400
commit6b5142950b1b5452fc29621ee01abe9c81eaee2c (patch)
tree7a9c75ade059781381e04ce7c9eac46935cd43f6 /src/mongo/db/s
parent69861af0f5d1f569d04b22fbf3ad408403aeca27 (diff)
downloadmongo-6b5142950b1b5452fc29621ee01abe9c81eaee2c.tar.gz
SERVER-19414 Clean up ShardRegistry initialization
Diffstat (limited to 'src/mongo/db/s')
-rw-r--r--src/mongo/db/s/sharding_state.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/s/sharding_state.cpp b/src/mongo/db/s/sharding_state.cpp
index 1ca8eea8c1e..b0acbada38e 100644
--- a/src/mongo/db/s/sharding_state.cpp
+++ b/src/mongo/db/s/sharding_state.cpp
@@ -125,12 +125,13 @@ void ShardingState::initialize(const string& server) {
auto catalogManager = stdx::make_unique<CatalogManagerLegacy>();
uassertStatusOK(catalogManager->init(configServerCS));
+ auto network = executor::makeNetworkInterface();
+ auto networkPtr = network.get();
auto shardRegistry(stdx::make_unique<ShardRegistry>(
stdx::make_unique<RemoteCommandTargeterFactoryImpl>(),
- stdx::make_unique<repl::ReplicationExecutor>(
- executor::makeNetworkInterface().release(), nullptr, 0),
- nullptr,
- catalogManager.get()));
+ stdx::make_unique<repl::ReplicationExecutor>(network.release(), nullptr, 0),
+ networkPtr));
+ shardRegistry->init(catalogManager.get());
shardRegistry->startup();
grid.init(std::move(catalogManager), std::move(shardRegistry));