[JAVA-424] Allow pool to shrink Created: 26/Aug/11 Updated: 03/Apr/14 Resolved: 26/Nov/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | None |
| Fix Version/s: | 2.12.0, 3.0.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 5 |
| Labels: | None | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Issue Links: |
|
||||||||||||||||
| Sub-Tasks: |
|
||||||||||||||||
| Description |
|
Add support for checking on unused resources in the pool so it can shrink over time (to the min pool size). This will work in conjunction with The connection pool will, at a configurable interval:
By default:
The minimum size is configuration using the method com.mongodb.MongoClientOptions.Builder#minConnectionsPerHost and the minPoolSize query parameter on the Mongo URI. The interval is not currently configurable. |
| Comments |
| Comment by Jeffrey Yemin [ 27/Feb/14 ] |
|
Hi there, Interested parties can test the fix with 2.12.0-rc0, available either on github or Maven Central. Any takers? Thanks, |
| Comment by Scott Hernandez (Inactive) [ 14/Sep/11 ] |
|
It would be good to implement a minSize and minToKeep options as well to control this. minSize will be the number allocated when the pool is created and minToKeep will be the low water mark on contraction. |