Mailing List Archive

Any downsides to using RAFDirectory instead of SimpleFSDirectory ?
Hello,
I know RAFDirectory was marked legacy, but can anyone please share any
downsides to using RAFDirectory over SimpleFSDirectory. I am running Solr
on a Windows server and mmap doesn't quite work well there, so I have been
using SimpleFS.

It was working well for the most part, but we recently started seeing
ClosedChannelException with SimpleFS which I have been trying to track. In
the meantime I found this info from SimpleFSDirectory java doc:

https://lucene.apache.org/core/7_7_2/core/org/apache/lucene/store/SimpleFSDirectory.html
*NOTE:* Accessing this class either directly or indirectly from a thread
while it's interrupted can close the underlying file descriptor immediately
if at the same time the thread is blocked on IO. The file descriptor will
remain closed and subsequent access to SimpleFSDirectory
<https://lucene.apache.org/core/7_7_2/core/org/apache/lucene/store/SimpleFSDirectory.html>
will
throw a ClosedChannelException
<https://docs.oracle.com/javase/8/docs/api/java/nio/channels/ClosedChannelException.html?is-external=true>.
If your application uses either Thread.interrupt()
<https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupt-->
or Future.cancel(boolean)
<https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true#cancel-boolean->
you
should use the legacy RAFDirectory from the Lucene misc module in favor of
SimpleFSDirectory
<https://lucene.apache.org/core/7_7_2/core/org/apache/lucene/store/SimpleFSDirectory.html>
.

And hence my question:
Any there any downsides to using RAFDirectory instead of SimpleFSDirectory ?

Thanks.,
Rahul