MakMak wrote:
Hey Mike, thanks for the quick response, I tried passing Directory to
IndexReader.open() and there were no deadlocks!! I will get rid of
synchronizing on FSDirectory too.
Great!
However do you think it will be better to modify the docs for
FSDirectory
and remove the sync part of "Directories are cached, so that, for a
given
canonical path, the same FSDirectory instance will always be
returned by
getDirectory. This permits synchronization on directories." Sounds
misleading.
Hmm -- good point. I'll remove that last sentence.
Lastly, can you please very briefly explain why passing a Directory
worked?
The deadlock happens when the reader tries to close the directory,
which it only does if it had opened it when passed a File or String.
If you pass Directory in, then the reader does not close it.
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org