lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ganyo <>
Subject No timeout for "write.lock"
Date Wed, 07 May 2003 16:03:11 GMT
I've come across something in the locking mechanism that is causing me 
grief.  Often, in the course of obtaining locks, Lucene uses a mechanism 
that waits for a lock to become available and times out after 10 seconds 
(see  There are two cases where 
this process is not used, though, (both are for the "write.lock" and the 
attempt to lock will immediately throw an Exception:

1) IndexWriter constructor.  During construction, obtaining index.write 
lock is attempted and if it is denied, the Exception is thrown.  (Later, 
the same method does use the timeout mechanism wait for the commit.lock 
to be obtained.)

2) IndexReader.delete().  This will also fail immediately if the 
write.lock can't be obtained.

Is there a reason/what is the reason why the write.lock isn't using the 
wait/timeout mechanism?  I'd really like to increase the chances of a 
successful write and this seems like a straightforward way to do it...


"They who can give up essential liberty to obtain a little temporary safety deserve neither
liberty nor safety." - Benjamin Franklin

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message