[SERVER-6133] flushing connection pool can leak connections Created: 19/Jun/12 Updated: 11/Jul/16 Resolved: 21/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Stability |
| Affects Version/s: | 2.0.6, 2.1.1 |
| Fix Version/s: | 2.1.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
In client/connpool.cpp, the PoolForHost::flush() function takes every connection out of the pool, calls isMaster on it, then puts it back into the pool. If isMaster throws an exception then that connection and any other connections that have already been removed from the pool will be leaked. We should catch the exception and delete the connection. |
| Comments |
| Comment by auto [ 21/Jun/12 ] |
|
Author: {u'date': u'2012-06-20T15:06:19-07:00', u'email': u'spencer@10gen.com', u'name': u'Spencer T Brody'}Message: Dont leak connections from the pools when there is an exception. |