[CXX-688] how to use connection pool in 1.0.0+ Created: 30/Sep/15  Updated: 11/Sep/19  Resolved: 16/Oct/15

Status: Closed
Project: C++ Driver
Component/s: API
Affects Version/s: legacy-1.0.5
Fix Version/s: None

Type: Task Priority: Critical - P2
Reporter: yanbo Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We were using 2.6compact bcanch in the last one year. Now we are goting to move to the current l.0.0+legacy branch to get a full support for mongo 3.0.
howerver, we find that there is no connpool.h file in 1.0.0+branch and no DBConnectionPool class.

If we directly use instance from DBClientReplicaSet or its parent classes with pointer, the connection can't be released in time event we destroy the pointer, so that if we create tens of thousands of instances, we will catch socket limit exception. That's why we use DBConnectionPool, connection can be reused, and we can also call done() method to explictily release connection.



 Comments   
Comment by Andrew Morrow (Inactive) [ 16/Oct/15 ]

Hi yanbo8502 - Since I've not heard back from you, I'm closing this as Wont Fix. Please feel free to re-open the ticket if you have further questions, or reach out on the mongodb user group.

Comment by Andrew Morrow (Inactive) [ 30/Sep/15 ]

Please see this thread for a detailed discussion of the pool removal: https://groups.google.com/forum/#!topic/mongodb-dev/3JNWMb1xeZA, which in turn links to several other discussions. At this time we have no plans to re-introduce a pool in the legacy C++ driver. Our recommendation is that applications that require pooling should implement application specific pooling appropriate to local needs.

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