lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sertic Mirko, Bedag" <Mirko.Ser...@bedag.ch>
Subject NFS, Stale File Handle Problem and my thoughts....
Date Wed, 20 Jan 2010 13:29:40 GMT
Hi@all

 

We are using Lucene 2.4.1 on Debian Linux with 2 boxes. The index is
stored on a common NFS share. Every box has a single IndexReader
instance, and one Box has an IndexWriter instance, adding new documents
or deleting existing documents at a given point in time. After adding or
deleting the documents, a IndexWriter.optimize() is called. Every box
checks periodically with IndexReader.isCurrent if the index needs to be
reopened.

 

Now, we are encountering a "Stale file handle" error on box b after the
index was modified and optimized by box a.

 

As far as i understand the problem with NFS is that box b tries to
open/access a file that was deleted by box a on the NFS share.

 

The question is now, when are files deleted? Does only the index
optimization delete files, or can files be deleted just by adding or
removing documents from an existing index? 

 

I now that there might be a better setup with Lucene and index
replication, but this is an existing application and we cannot change
the architecture now. So what would be the best solution?

 

Can I just "change" the way Lucene deletes files? I think that just
renaming no longer needed files would be good on NFS. After every
IndexReader has reopened the index, the renamed files can be safely
deleted, as they are definitely no longer needed. Where would be the
hook point? I heard something about IndexDeletionPolicy....

 

Thanks in advance!

 

Mirko

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message