lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: How do I unlock?
Date Tue, 11 Jan 2005 20:13:30 GMT

: I'm getting
: Lock obtain timed out.
:
: I was developing and forgot to close the writer.  How do I recover?  I
: killed the program, put the close in, but it won't let me open again.

if you are using FSDirectory then a lock file was put onto your disk in
the directory returned by...

    System.getProperty("org.apache.lucene.lockdir",System.getProperty("java.io.tmpdir"));

so if you haven't defined the property "org.apache.lucene.lockdir" then
it's whereever your JVM normally puts tmp files (on *nix it's usually in
/var/tmp ... somtimes /tmp)


This question has come up a couple of times in the last few weeks, while
leads me to think:

1) There should probably be a FAQ on discussing:
    1) where lock files are typically found on various OSes
    2) the naming convention of lucene lock files.
    2) how to manually clean up lock files (and other files in the index
       directory) in a safe manner.

2) it might be a good idea to add a static utility method for cleanly
removing all locks (or all lokcs of a particular type) on an index given a
Directory.  Javadocs would indicate this is an "Expert" method which
should only be used in code designed to try and recover from serious
errors.



	thoughts?



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message