lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <>
Subject Re: Lucene 2.2, NFS, Lock obtain timed out
Date Fri, 29 Jun 2007 23:42:52 GMT
Patrick Kimber wrote:

> As requested, I have been trying to improve the
> logging in the application so I can give you more
> details of the update pattern.
> I am using the Lucene Index Accessor contribution
> to co-ordinate the readers and writers:
> LuceneIndexAccessor-t17416.html#a47049

Never used the IndexAccessor patch, so I may be
wrong in the following.

> If the close method, in the IndexAccessProvider, fails
> the exception is logged but not re-thrown:
> public void close(IndexReader reader) {
>   if (reader != null) {
>     try {
>       reader.close();
>     } catch (IOException e) {
>       log.error("", e);
>     }
> I have been checking the application log.  Just before
> the time when the lock file errors occur I found this
> log entry:
>   [11:28:59] [ERROR] IndexAccessProvider
>   /mnt/nfstest/repository/lucene/lucene-icm-test-1-0/
>   segments_h75 (No such file or directory)
>    at Method)

So a random file is opened as you close the reader...?
I conclude you use IndexReader to delete documents, right?
If so, these IndexReaders are actually writers, and we
should see them as such when discussing this.

If this is the case, just to verify - you should use the
IndexReader constructor that takes a DeletionPolicy param.
Otherwise default deletion policy will be used, and
old files would be removed "too soon".

If you do use the correct IndexReader constructor, it
might indicate that the 10-minutes-deletion-policy does
not work as it should, like Mark suggested.

> - I guess the missing segments file could result
> in the lock file not being removed?


> - Is it safe to ignore this exception (probably not)?

No, let's fix it...  /;->

> - Why would the segments file be missing?  Could this
> be connected to the NFS issues in some way?

I would think so.

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

View raw message