lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
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 hitting  
LockObtainFailedException, then that means somehow you are trying to  
open two live writers on the same index.


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:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message