diff options
author | Kevin Pulo <kevin.pulo@mongodb.com> | 2018-08-09 04:00:41 +0000 |
---|---|---|
committer | Kevin Pulo <kevin.pulo@mongodb.com> | 2018-09-03 06:18:37 +0000 |
commit | 23794c14b03bb272daad7a2b25eca0b80c03a31c (patch) | |
tree | 2c60ec7adb337f99cefe1af28d8b7f4eee3c9239 /src/mongo/shell/shell_options.cpp | |
parent | 2704d7a89e64167fcff7356ada111b313146474e (diff) | |
download | mongo-23794c14b03bb272daad7a2b25eca0b80c03a31c.tar.gz |
SERVER-33606 fail to create logical session in shell connected to old servers
Also add --disableImplicitSessions shell cmdline arg.
Diffstat (limited to 'src/mongo/shell/shell_options.cpp')
-rw-r--r-- | src/mongo/shell/shell_options.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/shell/shell_options.cpp b/src/mongo/shell/shell_options.cpp index 71cf4ceb147..a3e6d9e82d5 100644 --- a/src/mongo/shell/shell_options.cpp +++ b/src/mongo/shell/shell_options.cpp @@ -220,6 +220,11 @@ Status addMongoShellOptions(moe::OptionSection* options) { moe::Switch, "automatically retry write operations upon transient network errors"); + options->addOptionChaining("disableImplicitSessions", + "disableImplicitSessions", + moe::Switch, + "do not automatically create and use implicit sessions"); + options ->addOptionChaining( "rpcProtocols", "rpcProtocols", moe::String, " none, opQueryOnly, opMsgOnly, all") @@ -387,6 +392,9 @@ Status storeMongoShellOptions(const moe::Environment& params, if (params.count("retryWrites")) { shellGlobalParams.shouldRetryWrites = true; } + if (params.count("disableImplicitSessions")) { + shellGlobalParams.shouldUseImplicitSessions = false; + } if (params.count("rpcProtocols")) { std::string protos = params["rpcProtocols"].as<string>(); auto parsedRPCProtos = rpc::parseProtocolSet(protos); |