-
Type: Improvement
-
Resolution: Done
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
The `mongoc_topology_t` contains a topology description that is updated to reflect the known status of the database topology. For each server, a thread will be spawned to monitor that server's status. These threads all contend to keep the topology description up-to-date. Additionally, the SRV monitor thread can also update the topology concurrently.
All operations that access the topology are guarded by a single mongoc_topology_t::mutex, so a single thread locking this mutex can bring every client thread to a halt while it performs necessary updates.