You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Joshua McKenzie (JIRA)" <ji...@apache.org> on 2014/08/14 23:16:18 UTC

[jira] [Commented] (CASSANDRA-7772) Windows - fsync-analog, flush data to disk

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

Joshua McKenzie commented on CASSANDRA-7772:
--------------------------------------------

It looks like FileDescriptor in nio has a [method to sync to disk|http://docs.oracle.com/javase/7/docs/api/java/io/FileDescriptor.html#sync()].  There's the possibility for some [discrepancy in performance|http://stas-blogspot.blogspot.com/2011/11/java-file-flushing-performance.html] on various platforms so it might be worth checking if we're gaining anything with the native fsync call over a FileDescriptor.sync call on linux at this point.

Another option would be to start on a windows-specific CLibrary and pursue using [FlushFileBuffers|http://msdn.microsoft.com/en-us/library/aa364439(v=vs.85).aspx].  The remainder of our CLibrary routines don't have many analogs on win7 (page cache hinting specifically).  In my opinion syncing alone doesn't warrant adding an abstraction on top of CLibrary to branch to os-specific native code unless the FileDescriptor sync performance is terrible on Windows.

> Windows - fsync-analog, flush data to disk
> ------------------------------------------
>
>                 Key: CASSANDRA-7772
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7772
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Joshua McKenzie
>            Assignee: Joshua McKenzie
>              Labels: Windows
>             Fix For: 3.0
>
>
> We currently use CLibrary fsync linux-native calls to flush to disk.  Given the role this plays in our SequentialWriter and data integrity in general we need some analog to this function on Windows.



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