diff options
author | Spencer T Brody <spencer@mongodb.com> | 2016-01-25 17:10:55 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2016-01-29 14:05:38 -0500 |
commit | 569041f7df6f62c1b026cc5fefe70c3998092db3 (patch) | |
tree | 7cda3770df217224e0196ce0956be731877277de /src/mongo/db/s/sharding_state.cpp | |
parent | 8f4c9f4f690407f5676da8c7089a7512a1d4d014 (diff) | |
download | mongo-569041f7df6f62c1b026cc5fefe70c3998092db3.tar.gz |
SERVER-20030 Shut down ShardRegistry
(cherry picked from commit 06bd28f354ec36227cd085660fee35c3f8a8543d)
Diffstat (limited to 'src/mongo/db/s/sharding_state.cpp')
-rw-r--r-- | src/mongo/db/s/sharding_state.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/s/sharding_state.cpp b/src/mongo/db/s/sharding_state.cpp index 045484399e3..5a34d869de1 100644 --- a/src/mongo/db/s/sharding_state.cpp +++ b/src/mongo/db/s/sharding_state.cpp @@ -171,9 +171,9 @@ void ShardingState::shutDown(OperationContext* txn) { "Sharding state unavailable because the system is shutting down")); } - auto catalogMgr = grid.catalogManager(txn); - if (catalogMgr) { - catalogMgr->shutDown(txn); + if (_getInitializationState() == InitializationState::kInitialized) { + grid.shardRegistry()->shutdown(); + grid.catalogManager(txn)->shutDown(txn); } } |