diff options
| author | Yoonsoo Kim <yoonsoo.kim@mongodb.com> | 2022-09-19 19:48:09 +0000 |
|---|---|---|
| committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-19 20:41:59 +0000 |
| commit | 5f965bd777834a96e9fcffff740250240f28124c (patch) | |
| tree | 3e69c88948c855be223582f3b891c4be658ccd56 /src | |
| parent | 279ee64be148ce7bbba7a6414adca53e08dc72df (diff) | |
| download | mongo-5f965bd777834a96e9fcffff740250240f28124c.tar.gz | |
SERVER-69682 Add enableComputeMode start-up parameter
Diffstat (limited to 'src')
| -rw-r--r-- | src/mongo/db/mongod_main.cpp | 13 | ||||
| -rw-r--r-- | src/mongo/db/query/query_knobs.idl | 13 |
2 files changed, 24 insertions, 2 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index f1a5d2a4871..b344f20daf4 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -795,6 +795,19 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { startChangeCollectionExpiredDocumentsRemover(serviceContext); } + if (computeModeEnabled) { + if (!isStandalone || serverGlobalParams.clusterRole != ClusterRole::None) { + LOGV2_ERROR(6968200, "'enableComputeMode' can be used only in standalone server"); + exitCleanly(ExitCode::badOptions); + } + LOGV2_WARNING_OPTIONS( + 6968201, + {logv2::LogTag::kStartupWarnings}, + "There could be security risks in using 'enableComputeMode'. It is recommended to use " + "this mode under an isolated environment and execute the server under a user with " + "restricted access permissions"); + } + // Set up the logical session cache LogicalSessionCacheServer kind = LogicalSessionCacheServer::kStandalone; if (serverGlobalParams.clusterRole == ClusterRole::ShardServer) { diff --git a/src/mongo/db/query/query_knobs.idl b/src/mongo/db/query/query_knobs.idl index e36a60c4df3..118f87bee0a 100644 --- a/src/mongo/db/query/query_knobs.idl +++ b/src/mongo/db/query/query_knobs.idl @@ -723,7 +723,7 @@ server_parameters: expr: 100 * 1024 * 1024 validator: gt: 0 - + internalQueryCardinalityEstimatorMode: description: "Set to select a method for estimating cardinality in the Cascades optimizer." set_at: [ startup, runtime ] @@ -889,7 +889,7 @@ server_parameters: validator: gt: 0 lt: 16777216 - + internalMeasureQueryExecutionTimeInMicroseconds: description: "If true, the explain results include an additional 'executionTimeMicros' field to represent the execution time of each plan stage in microseconds" @@ -915,6 +915,15 @@ server_parameters: cpp_vartype: AtomicWord<bool> default: false + enableComputeMode: + description: "Boolean flag to enable the compute mode in which mongod is used not as a + persistent storage node, but as a worker node for executing queries." + set_at: [ startup ] + cpp_varname: "computeModeEnabled" + cpp_vartype: bool + default: + expr: false + # Note for adding additional query knobs: # # When adding a new query knob, you should consider whether or not you need to add an 'on_update' |
