diff options
author | Gabriel Marks <gabriel.marks@mongodb.com> | 2023-02-21 15:41:27 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-21 20:33:31 +0000 |
commit | 8fe8ae436514e4e490e8571219b71339333f3ceb (patch) | |
tree | e70adeb50136c500525fb00b89b40fa206e27d6a /src/mongo/db/mongod_main.cpp | |
parent | 5f1a3ae725feaed0ed31ca6f41b2f84057a88c40 (diff) | |
download | mongo-8fe8ae436514e4e490e8571219b71339333f3ceb.tar.gz |
Revert "SERVER-66482 Port Runtime Audit Configuration into a cluster server parameter"
This reverts commit eca135fd7dc1b8a1da3248ac553bf03128553ea5.
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index 5376f769496..c2060a15738 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -191,7 +191,6 @@ #include "mongo/executor/network_interface_thread_pool.h" #include "mongo/executor/thread_pool_task_executor.h" #include "mongo/idl/cluster_server_parameter_gen.h" -#include "mongo/idl/cluster_server_parameter_initializer.h" #include "mongo/idl/cluster_server_parameter_op_observer.h" #include "mongo/logv2/log.h" #include "mongo/platform/process_id.h" @@ -563,14 +562,6 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { exitCleanly(ExitCode::needDowngrade); } - // If we are on standalone, load cluster parameters from disk. If we are replicated, this is not - // a concern as the cluster parameter initializer runs automatically. - auto replCoord = repl::ReplicationCoordinator::get(startupOpCtx.get()); - invariant(replCoord); - if (!replCoord->isReplEnabled()) { - ClusterServerParameterInitializer::synchronizeAllParametersFromDisk(startupOpCtx.get()); - } - // Ensure FCV document exists and is initialized in-memory. Fatally asserts if there is an // error. FeatureCompatibilityVersion::fassertInitializedAfterStartup(startupOpCtx.get()); @@ -721,6 +712,8 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { << "startupRecoveryForRestore at the same time", !repl::startupRecoveryForRestore); + auto replCoord = repl::ReplicationCoordinator::get(startupOpCtx.get()); + invariant(replCoord); uassert(ErrorCodes::BadValue, str::stream() << "Cannot use queryableBackupMode in a replica set", !replCoord->isReplEnabled()); @@ -737,6 +730,9 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { startFreeMonitoring(serviceContext); + auto replCoord = repl::ReplicationCoordinator::get(startupOpCtx.get()); + invariant(replCoord); + if (serverGlobalParams.clusterRole == ClusterRole::ShardServer) { // Note: For replica sets, ShardingStateRecovery happens on transition to primary. if (!replCoord->isReplEnabled()) { |