diff options
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index 3508395ff16..cf5deb4ef0a 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -323,8 +323,6 @@ void initializeCommandHooks(ServiceContext* serviceContext) { MirrorMaestro::onReceiveMirroredRead(opCtx); } }; - - MirrorMaestro::init(serviceContext); CommandInvocationHooks::set(serviceContext, std::make_unique<MongodCommandInvocationHooks>()); } @@ -397,6 +395,8 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { logProcessDetails(nullptr); + initializeCommandHooks(serviceContext); + serviceContext->setServiceEntryPoint(std::make_unique<ServiceEntryPointMongod>(serviceContext)); // Set up the periodic runner for background job execution. This is required to be running @@ -677,7 +677,7 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { replCoord->startup(startupOpCtx.get(), lastShutdownState); } - initializeCommandHooks(serviceContext); + MirrorMaestro::init(serviceContext); if (!storageGlobalParams.queryableBackupMode) { |