lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Concurrent access IndexReader / IndexWriter - FileNotFoundException
Date Sat, 09 Jan 2010 13:51:00 GMT
Can you post the full FNFE stack trace?

Mike

On Fri, Jan 8, 2010 at 5:35 AM, legrand thomas <thomaslegrand14@yahoo.fr> wrote:
> Hi,
>
> I often get a FileNotFoundException when my single IndexWriter commits while the IndexReader
also tries to read. My application is multithreaded (Tomcat uses the business APIs); I firstly
thought the read/write access was thread-safe but I probably forget something.
>
>  Please help me to understand my mistakes:
>
> - When should I close the IndexWriter ? Each time I add/update a document or never ?
> - Should my java commit/read methods be synchronized ?
> - Should I lock the directory and what's the best way to do it ?
>
> I referred to the Lucene FAQ ("why do I sometimes get a FileNotFoundException when I
search and update my index at the same time?") but I did not disable any locking for processes
searching or updating the index.
>
> I use lucene-2.4.1.
>
> Thanks in advance,
> Tom
>
>
>
>

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