I hate  to speak after Otis, but the way we deal with this is by clearing
locks on server restart, in case a server crash occurs mid indexing and we
also optimize on server restart, it doesn't happen often (God bless Resin)
but when it has we faced no problems from Lucene.

Just fir the record we have a validate function that the LuceneInit calls it
looks something like this:

                try {
                        Directory directory =
FSDirectory.getDirectory(indexPath,false);
                        if ( directory.list().length == 0 ) clear() ;
                        Lock writeLock = directory.makeLock(writeFileName); 
                        if (!writeLock.obtain()) {
                                IndexReader.unlock(directory) ;
                        } else {
                                writeLock.release() ;
                        }
                } catch (IOException e) {
                        logger.error("Index Validate",e) ;
                }


Nader 

-----Original Message-----
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 30, 2004 4:09 PM
To: Lucene Users List; [EMAIL PROTECTED]
Subject: Re: read only file system

If you have a very recent Lucene, then you can disable locks with command
line parameters.  I believe a page describing various command line
parameters is on Lucene's Wiki.

Otis

--- Supun Edirisinghe <[EMAIL PROTECTED]> wrote:
> I think I'm alittle confused on how and index is put into use on a 
> readonly file system
> 
> I'm using Lucene in my web application. Our indexes are built off our 
> database nightly and copied into our web app servers.
> 
> I think our web app dies from time to time and sometimes a lock is 
> left behind from Lucene in /tmp/.
> 
> I have read that there is a disableLuceneLocks System Property(is that 
> the full name or is it something like 
> org.apache.jakarta...disableLuceneLocks?). But, I'm still not sure how 
> I can set that. Do I give it as commandline arg to the java VM?
> 
> thanks
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to