commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Berman (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (POOL-270) timeBetweenEvictionRunsMillis from config is ignored
Date Thu, 21 Aug 2014 00:25:27 GMT

     [ https://issues.apache.org/jira/browse/POOL-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Berman updated POOL-270:
--------------------------------

    Description: 
In the constructor for GenericKeyedObjectPool, the setting for timeBetweenEvictionRunsMillis
is always overridden by minEvictableIdleTimeMillis.

First setConfig() is called, which, ends up starting an evictor with a period of timeBetweenEvictionRunsMillis,
as expected. but the final line of the constructor calls startEvictor() again with minEvictableIdleTimeMillis,
which kills the first timer and starts a new one with the new period. This means effectively
the timeBetweenEvictionRunsMillis from the config is not used for anything.

I want testWhileIdle's verifications to run more often than I want the timeout for evicting
idle objects, which does not appear to be possible given this bug.

  was:
In the constructors for both GenericObjectPool and GenericKeyedObjectPool, the setting for
timeBetweenEvictionRunsMillis is always overridden by minEvictableIdleTimeMillis.

First setConfig() is called, which, ends up starting an evictor with a period of timeBetweenEvictionRunsMillis,
as expected. but the final line of the constructor calls startEvictor() again with minEvictableIdleTimeMillis,
which kills the first timer and starts a new one with the new period. This means effectively
the timeBetweenEvictionRunsMillis from the config is not used for anything.

I want testWhileIdle's verifications to run more often than I want the timeout for evicting
idle objects, which does not appear to be possible given this bug.


> timeBetweenEvictionRunsMillis from config is ignored
> ----------------------------------------------------
>
>                 Key: POOL-270
>                 URL: https://issues.apache.org/jira/browse/POOL-270
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Michael Berman
>
> In the constructor for GenericKeyedObjectPool, the setting for timeBetweenEvictionRunsMillis
is always overridden by minEvictableIdleTimeMillis.
> First setConfig() is called, which, ends up starting an evictor with a period of timeBetweenEvictionRunsMillis,
as expected. but the final line of the constructor calls startEvictor() again with minEvictableIdleTimeMillis,
which kills the first timer and starts a new one with the new period. This means effectively
the timeBetweenEvictionRunsMillis from the config is not used for anything.
> I want testWhileIdle's verifications to run more often than I want the timeout for evicting
idle objects, which does not appear to be possible given this bug.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message