-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: libmongoc
-
Labels:None
Currently mongoc_client_reset clears the session pool on the client's topology by calling _mongoc_topology_clear_session_pool. This is fine for a single-threaded client, but not ok for a client derived from a mongoc_client_pool_t since the topology object is shared among all pooled clients, and no lock is taken.
We decided not to implement a mongoc_client_pool_reset in CDRIVER-2857 (relevant comment).
mongoc_client_reset should probably warn and return without doing anything if given a multi-threaded client.
Let's also document in mongoc_client_reset that this only applies to single threaded clients.