[CDRIVER-809] Default pool size parameters are "inconvenient" to say the least Created: 17/Aug/15  Updated: 19/Oct/16  Resolved: 28/Aug/15

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.2-beta0
Fix Version/s: 1.2-rc0

Type: Improvement Priority: Minor - P4
Reporter: Jose Battig Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All



 Description   

When creating connection pools using mongoc_client_pool_new() the default values for _mongoc_client_pool_t.min_pool_size is inconvenient.

By default, its value is zero and it appears the only way to configure its value is by passing it on the uri.

I think it will be way more convenient to let the developer of a specific component using mongodb to decide the pool and other pool object settings programatically rather than rely on they being passed on the uri.



 Comments   
Comment by Githook User [ 28/Aug/15 ]

Author:

{u'name': u'Manuel Schoenlaub', u'email': u'manuel.schoenlaub@skiline.cc'}

Message: CDRIVER-809: Changes client pool size parameters to uint_32_t and adds documentation for the client pool size setters
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/b59b6381ff186ff03c742b4ac4dac4c52f048e00

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'name': u'Manuel Schoenlaub', u'email': u'manuel.schoenlaub@skiline.cc'}

Message: CDRIVER-809: Adds mongoc_client_pool_max_size and mongoc_client_pool_min_size to symbol files
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/248ff0100173fe97629c8b0dc3d3c2569c298e17

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'name': u'Manuel Schoenlaub', u'email': u'manuel.schoenlaub@skiline.cc'}

Message: CDRIVER-809: Adds functions to programatically configure connection pool size
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/81518878e84212c07f46cdd64897462e698441f0

Comment by Hannes Magnusson [ 25/Aug/15 ]

https://github.com/mongodb/mongo-c-driver/pull/261

Comment by Hannes Magnusson [ 17/Aug/15 ]

Makes sense to provide a programmatic way.

mongoc_client_pool_max_size(mongoc_client_pool_t *pool, int max_pool_size);
mongoc_client_pool_min_size(mongoc_client_pool_t *pool, int min_pool_size);

I'm not sure about changing the defaults.

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