lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volodymyr Bychkoviak <vbychkov...@i-hypergrid.com>
Subject Re: possible concurrent actions table
Date Wed, 02 Mar 2005 14:37:20 GMT


Friso van Vollenhoven wrote:

>Hi,
>
>I found this table at jGruru:
>http://www.jguru.com/forums/view.jsp?EID=910778
>
>Since the table seems to be about 2.5 years old, I was wondering if it is
>still correct.
>
>It says that I can concurrently delete and read a document. So if there
>are two threads using one IndexReader instance, they could concurrently
>read and delete a (possibly the same) document.
>  
>
document(int) and delete(int) are synchronized methods, so they can be 
used in different threads. However you'll get IllegalArgumentException 
trying to retrieve deleted document.

>And if the threads do not share a single IndexReader instance. Will the
>reading thread still see the document when the deleting thread has deleted
>(and commited) it (if both IndexReader instances were opened when the
>document was not yet deleted).
>  
>
reading IndexReader instance will not see changes until reopened. (also 
this instance will be unable to delete documents as well)

>
>Thanks to anyone who knows and answers,
>
>Friso
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>  
>

Regards,
Volodymyr Bychkoviak

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