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: occurs during the optimization of index
Date Tue, 18 Jul 2006 18:46:37 GMT

> Can anybody suggest how to avoid this problem and concurrently access 
> in the index accroos the network at the same time maintaining the index.

Unfortunately, there are known issues with locking and NFS.  The lock 
files (and underlying locking protocol) do not work reliably when used 
over NFS, and I believe this exception (FileNotFoundException) is one of 
the manifestations of this.

We're working on making locking more flexible (see 
http://issues.apache.org/jira/browse/LUCENE-305), so this issue will 
hopefully be correctly addressed in a future version of Lucene.

But in the meantime as a workaround you could either do your own 
external locking (tricky) or you could take safe snapshots of your index 
and share that.  For example, your single Writer could make a safe 
snapshot of the index when the Writer is closed, and then have all 
Searchers cutover to this safe copy once it's done.

Definitely look at how the Solr project:

   http://incubator.apache.org/solr/features.html
   http://incubator.apache.org/solr/tutorial.html

accomplishes this.  They have developed a sophisticated "snapshot" 
capability for distributing index copies around.  Even if you don't use 
Solr and even if you still want a single copy of the index (not 1 per 
Searcher) you can still borrow Solr's techniques (the nice "cp -l -r" 
trick for example) for making a safe copy of the index.

Mike

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