-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: Atlas Testing, Unified Test Runner
-
None
-
Needed
Action for Drivers
The unified test format spec clarifies additional error codes that may be ignored when executing killAllSessions to work around SERVER-54216 and Atlas prohibiting usage of the command. Additionally, it suggests several approaches to disable killAllSessions behavior for Atlas (e.g. detecting "mongodb.net" hostnames, implementing a configuration option for the test runner).
Original Description
Unified test format currently contains the recommendation to kill all sessions before every test:
Terminating Open Transactions
Open transactions can cause tests to block indiscriminately. Test runners SHOULD terminate all open transactions at the start of a test suite and after each failed test by killing all sessions in the cluster. Using the internal MongoClient, execute the killAllSessions command on either the primary or, if connected to a sharded cluster, all mongos servers.
killAllSessions command does not work in Atlas (HELP-22193). The closest workaround is killing the user's own sessions, but this currently doesn't work due to server bug (SERVER-54216).
Until SERVER-54216 is fixed, unified test runners should provide an option to not run killAllSessions at all, and the workload executor should request this option when instantiating the test runner.
When SERVER-54216 is fixed, unified test runners may switch to killing only sessions of their user, at which point the option to not kill sessions may be removed, OR outside of Atlas the test runners could continue killing all sessions but for Atlas testing the test runners would only kill their own sessions.
Note that killing sessions is not strictly necessary in the test runner unless transactions are actually being used, and currently Atlas planned maintenance tests do not use transactions.
- related to
-
SERVER-54216 killAllSessions produces authorization error while killing own sessions
- Closed
- split to
-
CDRIVER-3950 Workarounds for killAllSessions in unified test runner
- Backlog
-
CXX-2222 Workarounds for killAllSessions in unified test runner
- Backlog
-
CSHARP-3534 Workarounds for killAllSessions in unified test runner
- Closed
-
GODRIVER-1949 Workarounds for killAllSessions in unified test runner
- Closed
-
JAVA-4097 Workarounds for killAllSessions in unified test runner
- Closed
-
MOTOR-704 Workarounds for killAllSessions in unified test runner
- Closed
-
NODE-3189 Workarounds for killAllSessions in unified test runner
- Closed
-
PHPLIB-640 Workarounds for killAllSessions in unified test runner
- Closed
-
PYTHON-2636 Workarounds for killAllSessions in unified test runner
- Closed
-
RUBY-2574 Ignore Unauthorized error when executing killAllSessions in unified test runner for drivers-atlas-testing
- Closed
-
RUST-733 Workarounds for killAllSessions in unified test runner
- Closed