[ 
https://issues.apache.org/jira/browse/POOL-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709285#action_12709285
 ] 

Mark Thomas commented on POOL-135:
----------------------------------

The issue here is that addobjectToPool() returns an object to the pool and that 
another thread can borrow the newly returned object before _numActive is 
decremented. This can lead to _numActive > _maxActive although the real 
_numActive is <= _maxActive.

The fix ensures that when an object is returned to the pool, _numActive is 
decremented in the same sync block.


> _numActive > _maxActive under load
> ----------------------------------
>
>                 Key: POOL-135
>                 URL: https://issues.apache.org/jira/browse/POOL-135
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Mark Thomas
>            Assignee: Mark Thomas
>             Fix For: 1.5
>
>
> Whilst investigating other POOL issues, I noticed that _numActive can be > 
> _maxActive when under load. Test case and fix to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to