From 8817328f87564a29e9be2ed1a746cf40e89587eb Mon Sep 17 00:00:00 2001 From: Jack Mulrow Date: Fri, 18 May 2018 17:34:06 -0400 Subject: SERVER-32064 Requests from the shell should use an implicit session by default --- src/mongo/shell/shell_utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mongo/shell/shell_utils.cpp') 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); -- cgit v1.2.1