[CDRIVER-1558] minPoolSize bugs Created: 23/Sep/16  Updated: 18/Nov/17  Resolved: 26/Sep/16

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.4.2, 1.5.0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-2389 Deprecate minPoolSize and log a warni... Closed

 Description   

Two bugs:

  • minPoolSize should mean "the number of inactive clients to keep cached in the pool", so when a client is pushed, if there are already minPoolSize clients in the pool, the oldest should be freed. Instead, minPoolSize is compared to pool->size, which is the total number of active or inactive clients. So if there are 10 clients total and minPoolSize is 3, all pushed clients are freed, not just clients in excess of the first 3.
  • The pool is supposed to be a LIFO for memory coherence (CDRIVER-1196) but it destroys the most-recently used client, not the least-recently used.

Discovered investigating this message:

https://groups.google.com/forum/#!topic/mongodb-user/FmQHSSJreTA



 Comments   
Comment by Githook User [ 26/Sep/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1558 fix minPoolSize logic
Branch: r1.4
https://github.com/mongodb/mongo-c-driver/commit/fe583a7aa59f77e2c6d04aade8899344f94efb2c

Comment by Githook User [ 26/Sep/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1558 fix minPoolSize logic
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/7d884dab232da1681a756377f7bc0ec217d20d78

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