[ 
https://issues.apache.org/jira/browse/POOL-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Thomas resolved POOL-314.
------------------------------
    Resolution: Duplicate

This is a variation on the problem described in POOL-310 and the fix for that 
issue fixes this one as well.

> Return with testOnBorrow set
> ----------------------------
>
>                 Key: POOL-314
>                 URL: https://issues.apache.org/jira/browse/POOL-314
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Tim Broberg
>
> On call to GenericKeyedObjectPool.returnObject() with testOnReturn set, when 
> there are blocked GenericKeyedObjectPool.borrowObject() calls, I expect the 
> blocked calls to unblock if returning this object successfully would free up 
> a slot.
> Instead, returnObject() exits without checking for pending borrowObject()'s.
> This can result in a hung / timed out request despite the necessary resources 
> to fill the request being available.
>         if (getTestOnReturn()) {
>             if (!factory.validateObject(key, p)) {
>                 // blah blah blah
>                 return;
>             }
>         }
>         // blah blah blah
>         if (hasBorrowWaiters()) {
>             reuseCapacity(); // Never get here because we returned up above.
>         }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to