Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
Operating System: All
Platform: All
-
35617
Description
Under heavy usage on multithreaded environment, the pool start to show
NumActive property as negative value.
We've implemented a pool of sockets and if there is a problem creating new
sockets after some time of successful operation, the pool starts trying to
create new sockets but while trying to create them, it goes removing invalid
instances from the pool and after the evictor runs, it starts to invalidate the
objects, making the numActive property stay negative.
I changed the class GenericObjectPoolImpl to check if _numActive property is
bigger than Zero, before decrementing it and I'd like to know if this is ok so
I can submit a patch. From my tests, it's working fine after checking if
numActive is > than zero before executing numActive--.
Daniel