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] [Commented] (SOLR-7423) Non thread safe use of WeakHashMap can hang in get method.
Date Sun, 19 Apr 2015 20:06:58 GMT

    [ https://issues.apache.org/jira/browse/SOLR-7423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14502105#comment-14502105
] 

Uwe Schindler commented on SOLR-7423:
-------------------------------------

If you just need one that uses Identity (not equals), you can use WeakIdentityMap from Lucene.
This one can be backed by a ConcurrentHashMap for thread safety. MMapDirectory uses it.

> Non thread safe use of WeakHashMap can hang in get method.
> ----------------------------------------------------------
>
>                 Key: SOLR-7423
>                 URL: https://issues.apache.org/jira/browse/SOLR-7423
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>
> You can see this with some googling and I just saw it happen in TestSolrConfigHandler.
A thread was stuck in HttpCacheHeaderUtil in the get for the WeakHashMap.
> Apache commons-beanutils has a WeakFastHashMap that is supposed to be thread safe and
read efficient I think.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message