[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. 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. |