[
https://issues.apache.org/jira/browse/LUCENE-2795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066619#comment-13066619
]
Michael McCandless commented on LUCENE-2795:
--------------------------------------------
OK, so now we create a FileDescriptor obj in C and return that, by
setting the fd field directly? This is because fadvise/posix_fadvise
on an already opened fd isn't portable enough? Ie we must open the
file w/ the flags, instead, for some OS's?
I don't think you need posix_fadvise.h at all? Can't you just
#include the right headers per OS, inside each OS's ifdef?
Missing some { } around single-statement if bodies. Can you move the
"return NULL" in "if (class_ioex == NULL) return NULL;" to the next
line, with { }?
> Genericize DirectIOLinuxDir -> UnixDir
> --------------------------------------
>
> Key: LUCENE-2795
> URL: https://issues.apache.org/jira/browse/LUCENE-2795
> Project: Lucene - Java
> Issue Type: Improvement
> Components: core/store
> Reporter: Michael McCandless
> Assignee: Varun Thacker
> Labels: gsoc2011, lucene-gsoc-11, mentor
> Attachments: LUCENE-2795.patch, LUCENE-2795.patch, LUCENE-2795.patch
>
>
> Today DirectIOLinuxDir is tricky/dangerous to use, because you only want to
> use it for indexWriter and not IndexReader (searching). It's a trap.
> But, once we do LUCENE-2793, we can make it fully general purpose because
> then a single native Dir impl can be used.
> I'd also like to make it generic to other Unices, if we can, so that it
> becomes UnixDirectory.
--
This message is automatically generated by JIRA.
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]