-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Not Needed
-
Per the sessions spec the driver is required to send an endSessions command on client shutdown. However, we do not appear to currently do this.
Note that in our fix for this we should try to avoid issues like those described in NODE-4429 and JAVA-2859 where if a server is unavailable client shutdown hangs for 30 seconds until getting a server selection timeout error. Both Java and Node solve this by checking the topology first to see if there are any servers available matching a primaryPreferred read preference, and only attempting the command if such a server exists.
See: https://github.com/mongodb/node-mongodb-native/commit/5086eadf52e13369f584b9bd64477ab7f3522ff6 and https://github.com/mongodb/mongo-java-driver/commit/15210a62e9488b115b1be5f16c30b63bb2a3ef2c
Also, note that once we fix this bug we will need to sync the CMAP logging test change made in https://github.com/mongodb/specifications/pull/1374.
- is depended on by
-
RUST-1638 Fix duplicate CMAP logging test description
- Closed
- is related to
-
RUST-1069 Drivers should check out an implicit session only after checking out a connection
- Closed
-
RUST-1439 Pre-create drop() cleanup tasks
- Closed
- related to
-
JAVA-2859 Running shutdown command throws a MongoTimeoutException
- Closed
-
NODE-4429 4.8.0 Regression, "MongoClient.close" hangs for 30s when connection errored
- Closed
-
DRIVERS-2529 Add tests for endSessions cleanup behavior
- Backlog