Date: 2005-01-11T18:01:05
   Editor: HossMan
   Wiki: Jakarta Lucene Wiki
   Page: LuceneFAQ
   URL: http://wiki.apache.org/jakarta-lucene/LuceneFAQ

   prompted by lucene-users thread "How do I unlock?"

Change Log:

------------------------------------------------------------------------------
@@ -416,6 +416,16 @@
 it is obtained files are only opened or deleted, and one small file is
 read or written.
 
+==== My program crashed and now I get a "Lock obtain timed out." error. Where 
is the lock and how can i delete it? ====
+
+When using FSDirectory, Lock files are kept in the directory specified by the 
"org.apache.lucene.lockdir" system property if it is set, or by default in the 
directory specified by the "java.io.tmpdir" system property (on Unix boxes this 
is usually "/var/tmp")
+
+If for some strange reason "java.io.tmpdir" is not set, then the directory 
path you specified to create your index is used.
+
+Lock files have names that start with "lucene-" followed by an MD5 hash of the 
index directory path.
+
+If you are certain that a lock file is not in use, you can delete it manually. 
 You should also look at the methods 
"[http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/index/IndexReader.html#isLocked(org.apache.lucene.store.Directory)
 IndexReader.isLocked]" and 
"[http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/index/IndexReader.html#unlock(org.apache.lucene.store.Directory)
 IndexReader.unlock]" if you are interested in writting recovery code that can 
remove locks automaticly.
+
 
 ==== Is there a maximum number of segment infos whose summary (name and 
document count) is stored in the segments file? ====
 

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

Reply via email to