summaryrefslogtreecommitdiff
path: root/src/mongo/shell/shell_utils.cpp
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2018-05-18 17:34:06 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2018-06-13 11:43:45 -0400
commit8817328f87564a29e9be2ed1a746cf40e89587eb (patch)
tree1cae922e5cc0faf5b82cf914d2432e93e246ef55 /src/mongo/shell/shell_utils.cpp
parent9a7b88779fd519bd955daa106d5d19244fe4072d (diff)
downloadmongo-8817328f87564a29e9be2ed1a746cf40e89587eb.tar.gz
SERVER-32064 Requests from the shell should use an implicit session by default
Diffstat (limited to 'src/mongo/shell/shell_utils.cpp')
-rw-r--r--src/mongo/shell/shell_utils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp
index 2fedf14deec..50bd8a8ba80 100644
--- a/src/mongo/shell/shell_utils.cpp
+++ b/src/mongo/shell/shell_utils.cpp
@@ -272,6 +272,10 @@ BSONObj shouldRetryWrites(const BSONObj&, void* data) {
return BSON("" << shellGlobalParams.shouldRetryWrites);
}
+BSONObj shouldUseImplicitSessions(const BSONObj&, void* data) {
+ return BSON("" << true);
+}
+
BSONObj interpreterVersion(const BSONObj& a, void* data) {
uassert(16453, "interpreterVersion accepts no arguments", a.nFields() == 0);
return BSON("" << getGlobalScriptEngine()->getInterpreterVersionString());
@@ -310,6 +314,7 @@ void initScope(Scope& scope) {
scope.injectNative("_writeMode", writeMode);
scope.injectNative("_readMode", readMode);
scope.injectNative("_shouldRetryWrites", shouldRetryWrites);
+ scope.injectNative("_shouldUseImplicitSessions", shouldUseImplicitSessions);
scope.externalSetup();
mongo::shell_utils::installShellUtils(scope);
scope.execSetup(JSFiles::servers);