Issue Details (XML | Word | Printable)

Key: POOL-135
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Thomas
Reporter: Mark Thomas
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Pool

_numActive > _maxActive under load

Created: 13/May/09 10:38 PM   Updated: 19/Jun/09 04:10 PM
Return to search
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 1.5

Time Tracking:
Not Specified

Resolution Date: 13/May/09 10:48 PM


 Description  « Hide
Whilst investigating other POOL issues, I noticed that _numActive can be > _maxActive when under load. Test case and fix to follow.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Thomas added a comment - 14/May/09 06:35 AM
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.


Phil Steitz added a comment - 19/Jun/09 04:10 PM
Fixed in 1.5 release.