org.apache.lucene.store.LockObtainFailedExceptio: Lock obtain timed out: SimpleFSLock
We are getting the following below exception intermittently. Not sure what could be the root cause. We are using Lucene 2.4.0 version. Are there any known issues with this release version.
2012-10-22 20:44:47,215 12345 ERROR -
org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@C:\temp\search_idx\215\write.lock
at org.apache.lucene.index.IndexWriter.init(IndexWrit er.java:1054)
at org.apache.lucene.index.IndexWriter.<init>(IndexWr iter.java:670)
Should the close() method be called in the finally block to exit gracefully. It looks to me that there might be a thread contention issue? Not sure why would the write.lock file be not deleted upon close() method of IndexWriter.
Also, is rollback() method better than the wait in this case.
Thanks and appreciate your help.