diff options
author | Jason Carey <jcarey@argv.me> | 2017-11-02 15:06:54 -0400 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2017-11-09 18:35:00 -0500 |
commit | bf53cbe298bc6724b1f2b5bf16afbd9e3876c623 (patch) | |
tree | e09009ab740b9d3d15c48b1b9a3ec09c2086637b /jstests/libs | |
parent | c3c736d3f2755e7e8b59638fd94cb000265abdf3 (diff) | |
download | mongo-bf53cbe298bc6724b1f2b5bf16afbd9e3876c623.tar.gz |
SERVER-31777 deactivate logical sessions for fcv34
For anything less than fully upgraded to 3.6:
* suppress logicalSessionTimeoutMinutes in isMaster
* fail any commands that passes lsid
Diffstat (limited to 'jstests/libs')
-rw-r--r-- | jstests/libs/override_methods/enable_sessions.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/libs/override_methods/enable_sessions.js b/jstests/libs/override_methods/enable_sessions.js index 9e4954013a0..ebb78f703c3 100644 --- a/jstests/libs/override_methods/enable_sessions.js +++ b/jstests/libs/override_methods/enable_sessions.js @@ -43,6 +43,10 @@ // Override the runCommand to check for any command obj that does not contain a logical session // and throw an error. function runCommandWithLsidCheck(conn, dbName, cmdObj, func, funcArgs) { + if (jsTest.options().disableEnableSessions) { + return func.apply(conn, funcArgs); + } + const cmdName = Object.keys(cmdObj)[0]; // If the command is in a wrapped form, then we look for the actual command object @@ -77,6 +81,10 @@ // to cache the session for each connection instance so we can retrieve the same session on // subsequent calls to getDB. Mongo.prototype.getDB = function(dbName) { + if (jsTest.options().disableEnableSessions) { + return getDBOriginal.apply(this, arguments); + } + if (!sessionMap.has(this)) { const session = startSession(this); sessionMap.set(this, session); |