diff options
author | Celina Tala <celinahtala@gmail.com> | 2022-10-10 21:11:07 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-10 21:50:52 +0000 |
commit | 1ea5545dac92683baafbab6c53d721d80b376ece (patch) | |
tree | f29d90d90e355255d00575b7e0d75c38d6cd1b9d | |
parent | 670e298bb85f24d61393901b706c61b1b1c7aa67 (diff) | |
download | mongo-1ea5545dac92683baafbab6c53d721d80b376ece.tar.gz |
SERVER-69901 Moved `initializeCommandHooks` to before `ServiceEntryPoint` is set
-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) { |