lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-2273) FieldCacheImpl's getCacheEntries() is buggy as it uses WeakHashMap incorrectly and leads to ConcurrentModExceptions
Date Sun, 21 Feb 2010 11:06:28 GMT

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

Uwe Schindler updated LUCENE-2273:
----------------------------------

    Attachment: LUCENE-2273.patch

Here the fix, will commit this soon.

> FieldCacheImpl's getCacheEntries() is buggy as it uses WeakHashMap incorrectly and leads
to ConcurrentModExceptions
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2273
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2273
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2273.patch
>
>
> The way how WeakHashMap works internally leads to the fact that it is not allowed to
iterate over a WHM.keySet() and then get() the value. As each get() operation inspects the
ReferenceQueue of the weak keys, they may suddenly disappear. If you use the entrySet() iterator
you get key and value and no need to call get(), contains(),... that inspects the ReferenceQueue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message