[CSHARP-2337] Clearing connectionPools should close connections Created: 23/Jul/18  Updated: 27/Oct/23  Resolved: 29/Jan/19

Status: Closed
Project: C# Driver
Component/s: Connectivity
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Vincent Kam (Inactive) Assignee: Vincent Kam (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CSHARP-2231 Handshake changes for SDAM and Auth Closed

 Description   

ExclusiveConnectionPool's Clear() appears to simply abandons all existing connections without closing them.

If Clear becomes a blocking operation then we're going to need a ClearAsync version also.

Closing the connections in the background is dangerous because it creates a possible race conditions where connections are opened faster than they are closed leading to resource exhaustion. 

 


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