Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.2
-
None
Description
For GenericObjectPool, when numIdle > 0 and the idle object evictor is set to run (timeBetweenEvictionRunsMillis > 0), a race condition can occur between the Evictor and a borrowing thread, wherein the Evictor initiates a makeObject in ensureMinIdle and before the newly created object is placed in the pool, the borrowing thread initiates another makeObject that makes the number of instances in circulation = maxActive + 1.
This issue does not affect pool 1.3, since addObject is syncrhonized in that version. It does affect 1.4-RC1 (unreleased snapshot) and the code currently in the 1.4 release branch.