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:

org.apache.lucene.store.LockObtainFailedException: 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?

Reply via email to