[GODRIVER-388] Creating a new connection may leak a semaphore permit Created: 27/Apr/18 Updated: 28/Oct/23 Resolved: 28/Apr/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Connections |
| Affects Version/s: | 0.0.3 |
| Fix Version/s: | 0.0.4 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
In the connection pool logic, when we attempt to dial a new connection we first acquire a permit from the semaphore which represents the maximum number of connections we can dial at a time. If the dialing of the new connection returns an error, we do not release that permit which will permanently prevent the pool from being closed gracefully. To fix this problem, release the semaphore permit when an error from dialing a connection occurs. |
| Comments |
| Comment by Githook User [ 28/Apr/18 ] |
|
Author: {'email': 'kris@mongodb.com', 'username': 'skriptble', 'name': 'Kris Brandow'}Message: Fix race conditions and leaks in connection pool
Change-Id: I1390c184beb379d4cc775ba07b5d222342dc957e |
| Comment by Kristofer Brandow (Inactive) [ 27/Apr/18 ] |
|
Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/409354. |