[
https://issues.apache.org/jira/browse/LUCENE-4848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13605027#comment-13605027
]
Michael Poindexter commented on LUCENE-4848:
--------------------------------------------
OK, I will use Path, and produce 2 IndexInputs, one that uses a RAF (used by
default), and another that uses a Channel that share most of their code (I will
just do one super class with hooks for every place that depends on the actual
"descriptor parameter" and two subclasses).
I'll see if there is existing code in 5.x that is calling
FSDirectory.getDirectory() that depends on that being a File. If so, I will
not change it to return a Path, but rather introduce a new method
getDirectoryPath().
I think it's not a bug that the channel is auto-closed when interrupted, but
rather documented behavior (in InterruptibleChannel). Not trying to nitpick,
but just point out that this behavior is unlikely to change in the future since
it's how it's intended to work.
We could pretty easily retry when we get a ClosedByInterruptException, but do
you want that to happen as part of this patch or as another issue? I think
maybe that should go in as a separate patch since I think to make it work
properly you would have to make FSIndexInput.clone() open a new FileChannel
(essentially duplicating the file descriptor per-thread...that way when the
descriptor is closed due to an interrupt you only have to worry about reopening
that thread's FD, not all threads sharing the same FD).
> Add Directory implementations using NIO2 APIs
> ---------------------------------------------
>
> Key: LUCENE-4848
> URL: https://issues.apache.org/jira/browse/LUCENE-4848
> Project: Lucene - Core
> Issue Type: Task
> Reporter: Michael Poindexter
> Assignee: Uwe Schindler
> Priority: Minor
> Attachments: jdk7directory.zip
>
>
> I have implemented 3 Directory subclasses using NIO2 API's (available on
> JDK7). These may be suitable for inclusion in a Lucene contrib module.
> See the mailing list at http://lucene.markmail.org/thread/lrv7miivzmjm3ml5
> for more details about this code and the advantages it provides.
> The code is attached as a zip to this issue. I'll be happy to make any
> changes requested. I've included some minimal smoke tests, but any help in
> how to use the normal Lucene tests to perform more thorough testing would be
> appreciated.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]