For a client pool, a mongoc_cluster_t keeps a set of nodes. Each node is associated with a server, and contains an application-use connection. Nodes are created on demand as operations need them.
Cluster nodes are removed during some errors (e.g. a network error calling mongoc_cluster_disconnect_node). But a cluster node for a server will not be removed when the server is removed from the topology description.
That server will no longer be eligible for server selection. So I believe the cluster node will remain around until the client is destroyed.
This could be problematic for long running applications. If a server is periodically added and removed to the topology (perhaps due to poor connectivity or maintenance), many unusable cluster nodes could hang around.
- is related to
-
CDRIVER-3615 Reduce race conditions in SDAM error handling
- Closed