Skip to content

Commit d426b90

Browse files
authored
DRIVERS-1030: Session allocation should occur after connection checkout - test improvements (#1134)
1 parent 8bd2af8 commit d426b90

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

source/sessions/driver-sessions.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ This limits the number of implicit sessions to never exceed the maximum connecti
506506
The motivation for this behavior is to prevent too many sessions from being created in a scenario
507507
where only a limited number are actually needed to execute operations (i.e. TooManyLogicalSessions error).
508508

509-
This only applies to implicit sessions, explicit sessions should not be modified
510-
to be bound by connection checkout in this way.
509+
Explicit sessions MAY be changed to allocate a server session similarly, but it is not required.
511510

512511
How to Check Whether a Deployment Supports Sessions
513512
===================================================
@@ -1111,8 +1110,17 @@ ensure that they close any explicit client sessions and any unexhausted cursors.
11111110

11121111
13. To confirm that implicit sessions only allocate their server session after a successful connection checkout
11131112

1114-
* Create a MongoClient with maxPoolSize=1, and attach a command succeeded listener
1115-
* Initiate 3 concurrent operations, e.g. collection.insertOne(doc)
1113+
* Create a MongoClient with the following options: ``maxPoolSize=1`` and ``retryWrites=true``
1114+
* Attach a command started listener that collects each command's lsid
1115+
* Initiate the following concurrent operations
1116+
* insertOne
1117+
* deleteOne
1118+
* updateOne
1119+
* bulkWrite ``[ { updateOne } ]``
1120+
* findOneAndDelete
1121+
* findOneAndUpdate
1122+
* findOneAndReplace
1123+
* find
11161124
* Wait for all operations to complete
11171125
* Assert that all commands contain the same lsid
11181126

0 commit comments

Comments
 (0)