You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2014/09/14 00:39:33 UTC

[jira] [Commented] (LUCENE-5946) Change SimpleFSDirectory to use newByteChannel

    [ https://issues.apache.org/jira/browse/LUCENE-5946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14133009#comment-14133009 ] 

Uwe Schindler commented on LUCENE-5946:
---------------------------------------

One possibility would be to move the old SimpleFSDirectory to lucene/misc or lucene/snapshot, named RAFDirectory. SimpleFSDirectory in trunk should use Java 7 APIs only. The interrupt() arguments were never seen in any issue report, it was only Simon mentioning it on an issue.

Just dont use Future.cancel(true): [http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html#cancel(boolean)]

It's your own fault if you do this with Lucene code.

> Change SimpleFSDirectory to use newByteChannel
> ----------------------------------------------
>
>                 Key: LUCENE-5946
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5946
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>
> Currently our javadocs point to using SimpleFSDirectory "to avoid ClosedByInterruptException".
> But this is really bogus. If you interrupt() a thread doing i/o, then you need to be prepared for the consequences. Its just that RAF is broken and not interruptible at all, but that shouldnt justify us continuing to use it.
> SimpleFSDirectory should be "the most portable", so it should use Files.newByteChannel. And we should remove the javadocs/warnings about ClosedByInterrupt



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org