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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to