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: FileNotFoundException during indexing
Date Fri, 01 Aug 2008 09:45:40 GMT

Another option is to switch to native locks (dir.setLockFactory(new  
NativeFSLockFactory()), at which point you will never have to call  
IndexReader.unLock because native locks are always properly released  
by the OS when the JVM exits/crashes.

If on switching to native locks, and removing the call to  
IndexReader.unlock, you see IndexWriter.open hitting  
LockObtainFailedException, then that means somehow you are trying to  
open two live writers on the same index.

Mike

Wojtek212 wrote:

>
> Hi Mike,
> I'm sharing one instance of IndexManager across all threads and as  
> I've
> noticed only this one is used during indexing.
>
> I'm unlocking before every indexing operation to make sure it would be
> possible.
> When IndexWriter is closed I assume it releases the lock and  
> finishes its
> work.
> Does IndexWriter executes some threads and doesn't wait when they are
> finished?
> It's the only one situation I can imagine that there 2 IndexWriters...
>
>
> -- 
> View this message in context: http://www.nabble.com/FileNotFoundException-during-indexing-tp18766343p18769652.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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