lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: Poor performance "race condition" in FieldSortedHitQueue
Date Wed, 09 Aug 2006 18:22:12 GMT
On 8/9/06, Doron Cohen <DORONC@il.ibm.com> wrote:
>   public StringIndex getStringIndex (IndexReader reader, String field)
>   throws IOException {
>     field = field.intern();
>     synchronize(field) {  // < ----------- line added
>       Object ret = lookup (reader, field, STRING_INDEX, null);
>       if (ret == null) {
>          final int[] retArray = new int[reader.maxDoc()];
>          ... load field to cache ...
>       }

Assuming "field" wasn't being used to synchronize on something else,
this would still block *all* IndexReaders/Searchers trying to sort on
that field.

In Solr, it would make the situation worse.  If I had my warmed-up
IndexSearcher serving live requests, and a new Searcher is opened in
the background to be warmed, a getStringIndex(warming,"foo") would
also block all getStringIndex(live,"foo").

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

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


Mime
View raw message