Issue Details (XML | Word | Printable)

Key: POOL-145
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Klaus Kopruch
Votes: 0
Watchers: 1
Operations

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

Number of tested objects in eviction runs of GenericKeyedObjectPool

Created: 18/Jun/09 01:09 PM   Updated: 14/Jul/09 01:13 AM
Return to search
Component/s: None
Affects Version/s: 1.5.1
Fix Version/s: 1.5.2

Time Tracking:
Not Specified

Environment:
Operating System: All
Platform: All
Issue Links:
Reference
 

Resolution Date: 19/Jun/09 03:59 PM


 Description  « Hide
Hi,
if numTestsPerEvictionRun is set to n and there are less than n idle objects in the pool, the evictor thread will still make n tests on these objects in a round-robin manner, i.e. idle objects can be tested more than once per eviction run. As this also includes validity tests if testWhileIdle is enbabled and validity tests may be time-consuming, this is a rather unwanted behavior.

Instead of testing getNumTests() objects, the pool should test min(_pool.size(),getNumTests()) objects per eviction run.

Thomas Schürger already reported this bug for GenericObjectPool (see POOL-6). I found out now, that this bug still exists for GenericKeyedObjectPool. Apparently, POOL-6 only solved the bug in GenericObjectPool.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Klaus Kopruch made changes - 18/Jun/09 01:11 PM
Field Original Value New Value
Link This issue is related to POOL-6 [ POOL-6 ]
Phil Steitz made changes - 19/Jun/09 03:10 AM
Fix Version/s 1.5.2 [ 12314037 ]
Mark Thomas made changes - 19/Jun/09 03:59 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Phil Steitz made changes - 14/Jul/09 01:13 AM
Status Resolved [ 5 ] Closed [ 6 ]