lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ketan Deshpande <>
Subject LockObtainFailedException exception
Date Mon, 02 Mar 2009 15:18:57 GMT
  I am fairly new to Lucene, so forgive my elaborate explanation. We were facing frequent
issues with Lucene 1.2 (Unreleased write.lock() files). To overcome the same, we have recently
upgraded to Lucene 2.3.2 - however, we observed the following LockObtainFailedException exception
during our testing - 
2009-02-26 15:34:35,525 DEBUG [] Document()
2009-02-26 15:34:35,529 DEBUG [] adding
associated type
2009-02-26 15:34:35,529 DEBUG [] added
2009-02-26 15:34:36,535 ERROR [STDERR]
Lock obtain timed out: 
2009-02-26 15:34:36,536 ERROR [STDERR]  at
2009-02-26 15:34:36,536 ERROR [STDERR]  at org.apache.lucene.index.IndexWriter.init(
2009-02-26 15:34:36,536 ERROR [STDERR]  at org.apache.lucene.index.IndexWriter.<init>(
2009-02-26 15:34:36,536 ERROR [STDERR]  at
2009-02-26 15:34:36,536 ERROR [STDERR]  at
2009-02-26 15:34:36,536 ERROR [STDERR]  at
2009-02-26 15:34:36,536 ERROR [STDERR]  at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown
2009-02-26 15:34:36,536 ERROR [STDERR]  at 
2009-02-26 15:34:36,536 ERROR [STDERR]  at java.lang.reflect.Method.invoke(
2009-02-26 15:34:36,536 ERROR [STDERR]  at org.jboss.invocation.Invocation.performCall(

  From the stack trace, we can trace back the exception to the following code in the IndexWriter
class (while trying to acquire a lock):
Lock writeLock = directory.makeLock(IndexWriter.WRITE_LOCK_NAME);
if (!writeLock.obtain(writeLockTimeout)) // obtain write lock
    throw new LockObtainFailedException("Index locked for write: " + writeLock);

  We have seen this issue only once till now and the files did not index until we deleted
the lock file manually. (When I checked for existing issues, Lucene-715 came closest, but
it has been resolved in 2.1 version) I am afraid this may crop up sometime again. Any inputs
on how to resolve the the error would be appreciated. If any more details are required, I
would be happy to share the same. 

      Check out the all-new Messenger 9.0! Go to
View raw message