-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Shell
-
Fully Compatible
-
Platforms 2018-01-01, Platforms 2018-01-15, Sharding 2018-06-04, Sharding 2018-06-18, Sharding 2018-07-02
-
0
Existing database methods that start an implicit session
When an existing MongoDatabase method that does not take a session is called, the driver MUST check whether the deployment supports sessions (See How to Check Whether a Deployment Supports Session). If sessions are supported, the driver MUST behave as if a new ClientSession was started just for this one operation and ended immediately after this operation completes. The actual implementation will likely involve calling client.startSession, but that is not required by this spec.
Existing collection methods that start an implicit session
When an existing MongoCollection method that does not take a session is called, the driver MUST check whether the deployment supports sessions (See How to Check Whether a Deployment Supports Session). If sessions are supported, the driver MUST behave as if a new ClientSession was started just for this one operation and ended immediately after this operation completes. The actual implementation will likely involve calling client.startSession, but that is not required by this spec.
Sending the session ID to the server on all commands
When connected to a server that supports sessions a driver MUST append the session ID to every command it sends to the server (with the exceptions noted in the following section). It does this by adding a top level lsid field to the command sent to the server. A driver MUST do this without modifying any data supplied by the application (e.g. the command document passed to runCommand).:
{ commandName: ..., lsid : { id : <UUID> } }
- has to be done before
-
SERVER-35447 Implement exceptions to sending session ID on all commands in mongo shell
- Closed
- is duplicated by
-
SERVER-34153 MongoDB shell doesn't create a session implicitly
- Closed
- is related to
-
SERVER-34204 Tailable cursor fails on getMore against a sharded cluster
- Closed
-
SERVER-33606 mongo shell startSession() should fail if the server doesn't support logical sessions
- Closed
-
SERVER-37520 "too many users are authenticated" after getSiblingDB() and auth()
- Closed