You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2014/03/31 11:51:15 UTC

[jira] [Created] (LUCENE-5561) NativeUnixDirectory is broken

Michael McCandless created LUCENE-5561:
------------------------------------------

             Summary: 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


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