lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: IndexReader.isDeleted synchronization
Date Thu, 03 Jul 2008 11:55:42 GMT

But I think you still need to synchronize, because the first thread  
that does a deletion needs to create the deletedDocs BitVector and  
others need to wait while that's happening?

I think [eventually] getting to a read-only reader is the best  
approach (https://issues.apache.org/jira/browse/LUCENE-1030).

Mike

Jason Rutherglen wrote:

> A possible solution to the IndexReader.isDeleted synchronization is  
> to have a delegate class that is different depending on the Java  
> version.  For Java 1.4 the class defaults to the synchronization  
> used now.  A Java 1.5 version would use a volatile deletedDocs  
> attribute.  This would provide a backwards compatible solution and a  
> solution for Java versions with volatile working that can avoid the  
> use of synchronized.


---------------------------------------------------------------------
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