lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: 2 exceptions in IndexWriter
Date Thu, 25 Jul 2013 11:30:50 GMT
Can you describe what your test is doing?  How do you "purge the
index"?  It's best to open IndexWriter with OpenMode.CREATE to purge
(rather than remove the files yourself).

Lock obtain timed out means another IndexWriter is currently using
that directory.

Mike McCandless

On Thu, Jul 25, 2013 at 12:26 AM, Yonghui Zhao <> wrote:
> Recently I find my unit test will failed sometimes but no always.  I use
> Lucene 4.3.0
> After inverstigation, I found when I try to open a IndexWriter for a disk
> directory.
> Some time it will throw this exception:
> Lock obtain timed out:
> NativeFSLock@/tmp/test-idx/write.lock
> The default time out is 1000ms, when I set to 3000ms, seems this exception
> disappeared.
> But I think 1000ms should be enough, how can it happen.   What's the
> recommended number?
> Some time it will throw another exception which I think is more serious.
> read past EOF: SimpleFSIndexInput
> Each test will purge the index folder,  however this exception will happen
> sometimes.
> I don't know the reason, how can I fix this exception?

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

View raw message