[CDRIVER-3645] Cluster nodes are not removed on topology description change Created: 02/May/20  Updated: 23/Mar/23

Status: Backlog
Project: C Driver
Component/s: network
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-3615 Reduce race conditions in SDAM error ... Closed

 Description   

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.



 Comments   
Comment by Jeremy Mikola [ 08/May/20 ]

Cross-referencing with CDRIVER-3615, as this comment from its code review suggests that a change therein may address this issue.

removing the cluster node as soon as we've detected it is invalid might also help prevent cluster from hanging around indefinitely when the associated server description has been removed

Generated at Wed Feb 07 21:18:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.