Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use getMaxTimeoutWhenExhausted() when borrowing connection from pool #51

Closed
cporter71 opened this issue Nov 30, 2014 · 2 comments
Closed
Assignees

Comments

@cporter71
Copy link

Should getMaxTimeoutWhenExhausted() should be used versus the connection timeout when selectionStrategy.getConnection(). This seems to be true for all use cases w/in ConnectionPoolImpl.java with exception to: getConnectionForOperation().

public <R> Connection<CL> getConnectionForOperation(BaseOperation<CL, R> baseOperation) {
- return selectionStrategy.getConnection(baseOperation, cpConfiguration.getConnectTimeout(), TimeUnit.MILLISECONDS);
+ return selectionStrategy.getConnection(baseOperation, cpConfiguration.getMaxTimeoutWhenExhausted(), TimeUnit.MILLISECONDS);   
@opuneet
Copy link
Contributor

opuneet commented Dec 15, 2014

@cporter71 yeah that's a good catch, will fix!

@jcacciatore jcacciatore self-assigned this Jul 22, 2016
jcacciatore added a commit to jcacciatore/dyno that referenced this issue Jul 22, 2016
Using maxTimeoutWhenExhausted rather than connectTimeout when borrowing a connection.
jcacciatore added a commit that referenced this issue Jul 22, 2016
@jcacciatore
Copy link
Contributor

Fixed in PR #121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants