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

[jira] [Commented] (LUCENE-8982) Make NativeUnixDirectory pure java now that direct IO is possible

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

Uwe Schindler commented on LUCENE-8982:
---------------------------------------

We should rename the directory to something more generic. It's also supported on Windows!

In addition, the hardcoded alignment of 512 should be determined on directory creation (reading it from FileStore.getBlockSize().

Code should also create FileChannel directly not via forbidden Java.io.File classes. That was just a workaround to bring the FileDescriptor into the game.

> Make NativeUnixDirectory pure java now that direct IO is possible
> -----------------------------------------------------------------
>
>                 Key: LUCENE-8982
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8982
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/misc
>            Reporter: Michael McCandless
>            Priority: Major
>
> {{NativeUnixDirectory}} is a {{Directory}} implementation that uses direct IO to write newly merged segments.  Direct IO bypasses the kernel's buffer cache and write cache, making merge writes "invisible" to the kernel, though the reads for merging the N segments are still going through the kernel.
> But today, {{NativeUnixDirectory}} uses a small JNI wrapper to access the {{O_DIRECT}} flag to {{open}} ... since JDK9 we can now pass that flag in pure java code, so we should now fix {{NativeUnixDirectory}} to not use JNI anymore.
> We should also run some more realistic benchmarks seeing if this option really helps nodes that are doing concurrent indexing (merging) and searching.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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