[GODRIVER-2165] Make "pool.clear()" behavior match CMAP specification Created: 27/Sep/21  Updated: 13/Jan/22  Resolved: 13/Jan/22

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Matt Dale Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates GODRIVER-1827 Implement and Test Connection Pool Pa... Closed
Related
related to GODRIVER-1905 Provide explicit guidance on handling... Closed
is related to GODRIVER-2038 Use "ConnectionTimeout" for creating ... Closed
Epic Link: Avoiding connection storms
Quarter: FY22Q4

 Description   

The Clearing a Connection Pool section of the CMAP specification describes that:

As part of clearing the pool, the WaitQueue MUST also be cleared, meaning all requests in the WaitQueue MUST fail with errors indicating that the pool was cleared while the checkOut was being performed.

Currently the Go driver pool.clear() function does not empty the WaitQueue and only increments the latest generation number. Update it to also clear the WaitQueue.

Definition of done:

  • pool.clear() clears the WaitQueue and returns retryable error code to all waiting checkOut() callers.

Generated at Thu Feb 08 08:37:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.