diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2021-12-30 03:26:41 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-10 23:14:43 +0000 |
commit | 255959a734f98dc700afb43b05e0e9590bc7aa91 (patch) | |
tree | 17471d9b5fec1ab1346c71a0ffa1acb07b97cb8a /src/mongo/shell/shell_options.cpp | |
parent | 0791c57fb7a3e86be3880aa926dfb9bb54f76802 (diff) | |
download | mongo-255959a734f98dc700afb43b05e0e9590bc7aa91.tar.gz |
SERVER-62251 Add ServerParameterType::kClusterWide
Diffstat (limited to 'src/mongo/shell/shell_options.cpp')
-rw-r--r-- | src/mongo/shell/shell_options.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/shell/shell_options.cpp b/src/mongo/shell/shell_options.cpp index d67a554d584..9ad99f17852 100644 --- a/src/mongo/shell/shell_options.cpp +++ b/src/mongo/shell/shell_options.cpp @@ -307,15 +307,14 @@ Status storeMongoShellOptions(const moe::Environment& params, if (params.count("setShellParameter")) { auto ssp = params["setShellParameter"].as<std::map<std::string, std::string>>(); - auto map = ServerParameterSet::getGlobal()->getMap(); + auto* paramSet = ServerParameterSet::getNodeParameterSet(); for (auto it : ssp) { const auto& name = it.first; - auto paramIt = map.find(name); - if (paramIt == map.end() || !kSetShellParameterAllowlist.count(name)) { + auto param = paramSet->getIfExists(name); + if (!param || !kSetShellParameterAllowlist.count(name)) { return {ErrorCodes::BadValue, str::stream() << "Unknown --setShellParameter '" << name << "'"}; } - auto* param = paramIt->second; if (!param->allowedToChangeAtStartup()) { return {ErrorCodes::BadValue, str::stream() |