lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-5561) NativeUnixDirectory is broken
Date Tue, 01 Apr 2014 22:21:15 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-5561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael McCandless updated LUCENE-5561:
---------------------------------------

    Attachment: LUCENE-5561.patch

New patch, fixing nocommits, getting checksum working, and
conditionalizing TestNativeUnixDirectory to run only on unix.  I think
it's ready; we can later separately iterate on improving
BaseDirectoryTestCase and the TODOs to move away from our own JNI...


> NativeUnixDirectory is broken
> -----------------------------
>
>                 Key: LUCENE-5561
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5561
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 4.8, 5.0
>
>         Attachments: LUCENE-5561.patch, LUCENE-5561.patch
>
>
> Several things:
>   * It assumed ByteBuffer.allocateDirect would be page-aligned, but
>     that's no longer true in Java 1.7
>   * It failed to throw FNFE if a file didn't exist (throw IOExc
>     instead)
>   * It didn't have a default ctor taking File (so it was hard to run
>     all tests against it)
>   * It didn't have a test case
>   * Some Javadocs problems
>   * I cutover to FilterDirectory
> I tried to cutover to BufferedIndexOutput since this is essentially
> all that NativeUnixIO is doing ... but it's not simple because BIO
> sometimes flushes non-full (non-aligned) buffers even before the end
> of the file (its writeBytes method).
> I also factored out a BaseDirectoryTestCase, and tried to fold in
> "generic" Directory tests, and added/cutover explicit tests for the
> core directory impls.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


Mime
View raw message