summaryrefslogtreecommitdiff
path: root/src/mongo/db/db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/db.cpp')
-rw-r--r--src/mongo/db/db.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index b7f1c0945c8..cc005a763ab 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -968,9 +968,11 @@ void setUpReplication(ServiceContext* serviceContext) {
SecureRandom().nextInt64());
// Only create a ReplicaSetNodeExecutor if sharding is disabled and replication is enabled.
// Note that sharding sets up its own executors for scheduling work to remote nodes.
- if (serverGlobalParams.clusterRole == ClusterRole::None && replCoord->isReplEnabled())
+ if (serverGlobalParams.clusterRole == ClusterRole::None && replCoord->isReplEnabled()) {
ReplicaSetNodeProcessInterface::setReplicaSetNodeExecutor(
serviceContext, makeReplicaSetNodeExecutor(serviceContext));
+ ReplicaSetNodeProcessInterface::getReplicaSetNodeExecutor(serviceContext)->startup();
+ }
repl::ReplicationCoordinator::set(serviceContext, std::move(replCoord));
repl::setOplogCollectionName(serviceContext);