summaryrefslogtreecommitdiff
path: root/src/mongo/db/db.cpp
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2020-03-10 18:32:52 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-24 04:44:49 +0000
commitc1f3e2fca052039dd5ce1cea2fa4c3d4565cfe6c (patch)
tree55d15503d4c5ad8ea092e972885d6d4976c7a88b /src/mongo/db/db.cpp
parentef75364ada70eaf4a096ed07adfeb3175abd719b (diff)
downloadmongo-c1f3e2fca052039dd5ce1cea2fa4c3d4565cfe6c.tar.gz
SERVER-46201 add ReplicaSetAwareService, convert Balancer to use it
Diffstat (limited to 'src/mongo/db/db.cpp')
-rw-r--r--src/mongo/db/db.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index 2742b0666b0..3768b09dc68 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -121,7 +121,7 @@
#include "mongo/db/repl/storage_interface_impl.h"
#include "mongo/db/repl/topology_coordinator.h"
#include "mongo/db/repl_set_member_in_standalone_mode.h"
-#include "mongo/db/s/balancer/balancer.h"
+#include "mongo/db/replica_set_aware_service.h"
#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/sharding_catalog_manager.h"
@@ -627,8 +627,6 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) {
ConnectionString::forLocal(),
kDistLockProcessIdForConfigServer);
- Balancer::create(startupOpCtx->getServiceContext());
-
ShardingCatalogManager::create(
startupOpCtx->getServiceContext(),
makeShardingTaskExecutor(executor::makeNetworkInterface("AddShard-TaskExecutor")));
@@ -1074,12 +1072,6 @@ void shutdownTask(const ShutdownTaskArgs& shutdownArgs) {
WaitForMajorityService::get(serviceContext).shutDown();
- // Terminate the balancer thread so it doesn't leak memory.
- if (auto balancer = Balancer::get(serviceContext)) {
- balancer->interruptBalancer();
- balancer->waitForBalancerToStop();
- }
-
// Join the logical session cache before the transport layer.
if (auto lsc = LogicalSessionCache::get(serviceContext)) {
lsc->joinOnShutDown();