commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Thomas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (POOL-202) GenericKeyedObjectPool.close() can interfere with evict(); eviction[Key]Iterator is not consistently synched.
Date Fri, 21 Feb 2014 16:16:20 GMT

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

Mark Thomas updated POOL-202:
-----------------------------

    Fix Version/s: 2.0

> GenericKeyedObjectPool.close() can interfere with evict(); eviction[Key]Iterator is not
consistently synched.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: POOL-202
>                 URL: https://issues.apache.org/jira/browse/POOL-202
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sebb
>             Fix For: 2.0
>
>
> As far as I can tell, calling close during an evict() run can cause problems, because
close() sets the eviction[Key]Iterator fields to null.
> I suspect close() and evict() should be mutually exclusive.
> Maybe close does not need to nullify the eviction[Key]Iterator fields, but there's probably
other mutually incompatible behaviour.
> Or maybe the fields should be nulled in startEvictor.
> Also, the fields eviction[Key]Iterator aren't volatile and aren't always accessed under
the same lock so might not be safely published.
> That would be solved by moving the nulling to startEvictor.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message