lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: No timeout for "write.lock"
Date Wed, 07 May 2003 23:29:31 GMT
Scott Ganyo wrote:
> Is there a reason/what is the reason why the write.lock isn't using the 
> wait/timeout mechanism?

Yes.  Lucene only permits a single process to modify an index at once. 
Multiple processes are permitted to read an index at once, but only one 
can modify it.  The write.lock enforces this, and applications should be 
written accordingly.

Also, a process can own the write lock for an arbitrarily long time (as 
long as an IndexWriter is open) so a timeout doesn't really make sense. 
  The commit.lock is never held for more than the time it takes to open 
all of the files in the index, or to write the segments file.  This 
should never take more than a second, and in most cases should be much 
faster than that.  So it makes sense to have a timeout on that lock.


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

View raw message