summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.cpp3
-rw-r--r--src/mongo/db/s/sharding_state.cpp1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
index 5bdfcc46ca2..93dd61ad3ef 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -87,6 +87,7 @@
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/cluster_identity_loader.h"
#include "mongo/s/grid.h"
+#include "mongo/s/periodic_balancer_settings_refresher.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/thread.h"
@@ -714,6 +715,7 @@ void ReplicationCoordinatorExternalStateImpl::shardingOnStepDownHook() {
invariant(serverGlobalParams.clusterRole == ClusterRole::ShardServer);
ShardingState::get(_service)->interruptChunkSplitter();
CatalogCacheLoader::get(_service).onStepDown();
+ PeriodicBalancerSettingsRefresher::get(_service)->stop();
}
ShardingState::get(_service)->markCollectionsNotShardedAtStepdown();
@@ -802,6 +804,7 @@ void ReplicationCoordinatorExternalStateImpl::_shardingOnTransitionToPrimaryHook
}
CatalogCacheLoader::get(_service).onStepUp();
+ PeriodicBalancerSettingsRefresher::get(_service)->start();
ShardingState::get(_service)->initiateChunkSplitter();
}
diff --git a/src/mongo/db/s/sharding_state.cpp b/src/mongo/db/s/sharding_state.cpp
index 5c0f925cb91..b775ca6ae0b 100644
--- a/src/mongo/db/s/sharding_state.cpp
+++ b/src/mongo/db/s/sharding_state.cpp
@@ -343,7 +343,6 @@ Status ShardingState::initializeFromShardIdentity(OperationContext* opCtx,
repl::MemberState::RS_PRIMARY);
CatalogCacheLoader::get(opCtx).initializeReplicaSetRole(isStandaloneOrPrimary);
-
_chunkSplitter->setReplicaSetMode(isStandaloneOrPrimary);
log() << "initialized sharding components for "