-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: libmongoc
-
None
When user code forks, various resources in the client need to be protected against parallel use in both the parent and the child code. These include the following:
sessions:
- ensure we don't call endSessions for lsids the parent process might be using
- ensure we don't use such lsids at all, for any operations, in the child
cursors:
- ensure we don't call killCursors for cursors the parent process might be using
- ensure we don't call getmores on such cursors, either
connections:
- close all client connections in the child, so we don't write to the same sockets as the parent
See DRIVERS-578 for more details.
- is depended on by
-
CXX-1672 Driver session pools must be cleared after forking
- Closed
-
DRIVERS-578 Driver session pools must be cleared after forking
- Closed
-
PHPC-1274 Reset libmongoc client after forking to avoid interacting with parent resources in child processes
- Closed
-
PHPC-1284 Driver session pools must be cleared after forking
- Closed
- related to
-
CDRIVER-3116 Do not disconnect sockets in mongoc_client_reset()
- Closed
-
CDRIVER-3438 Destroy exhaust cursor socket in mongoc_cursor_destroy regardless of client generation
- Closed
-
CDRIVER-2919 Update documentation for mongoc_client_pool_destroy
- Closed
-
CDRIVER-2918 Clean up topology background thread logic
- Closed