[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:
Related
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. SERVER-6133
Branch: master
https://github.com/mongodb/mongo/commit/3c6c01c1a1dfd3b1a8ab4e0e17623a36befdb2fd

Generated at Thu Feb 08 03:10:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.