summaryrefslogtreecommitdiff
path: root/src/mongo/s/grid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/grid.cpp')
-rw-r--r--src/mongo/s/grid.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index d4a6a827af5..c6a03319b1c 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -38,6 +38,7 @@
#include "mongo/s/balancer/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
+#include "mongo/s/catalog/sharding_catalog_manager.h"
#include "mongo/s/client/shard_factory.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/query/cluster_cursor_manager.h"
@@ -58,6 +59,7 @@ Grid* Grid::get(OperationContext* operationContext) {
}
void Grid::init(std::unique_ptr<ShardingCatalogClient> catalogClient,
+ std::unique_ptr<ShardingCatalogManager> catalogManager,
std::unique_ptr<CatalogCache> catalogCache,
std::unique_ptr<ShardRegistry> shardRegistry,
std::unique_ptr<ClusterCursorManager> cursorManager,
@@ -65,6 +67,7 @@ void Grid::init(std::unique_ptr<ShardingCatalogClient> catalogClient,
std::unique_ptr<executor::TaskExecutorPool> executorPool,
executor::NetworkInterface* network) {
invariant(!_catalogClient);
+ invariant(!_catalogManager);
invariant(!_catalogCache);
invariant(!_shardRegistry);
invariant(!_cursorManager);
@@ -73,6 +76,7 @@ void Grid::init(std::unique_ptr<ShardingCatalogClient> catalogClient,
invariant(!_network);
_catalogClient = std::move(catalogClient);
+ _catalogManager = std::move(catalogManager);
_catalogCache = std::move(catalogCache);
_shardRegistry = std::move(shardRegistry);
_cursorManager = std::move(cursorManager);
@@ -108,6 +112,7 @@ void Grid::advanceConfigOpTime(repl::OpTime opTime) {
}
void Grid::clearForUnitTests() {
+ _catalogManager.reset();
_catalogClient.reset();
_catalogCache.reset();
_shardRegistry.reset();