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

Garth Pickell updated CASSANDRA-9951:
-------------------------------------
    Description: 
So in windows, the JVM tends to open files without FILE_SHARE_DELETE when using 
the older java.io.* components. This, I think, is a problem for Cassandra in 
that:

a) it is not standard behavior.
b) Cassandra kind of relies on this a lot as you routinely see problems in the 
log regarding renaming of files or deleting of files.

I don't think this is a bad design by any means, but Windows users will tend to 
experience many problems in the areas of commit log cleanups and compaction.

However, if you use the java.nio.file.Files class instead for opening files. 
These methods use FILE_SHARE_DELETE.

I have personally tested this, and I have done some poking around in the 
Cassandra source which leads me to believe that changing over these usages 
would be relatively easy.

  was:
So in windows, the JVM tends to open files without FILE_SHARE_DELETE when using 
the older java.io.* components. This, I think, is a problem for Cassandra in 
that:

a) it is not standard behavior.
b) Cassandra kind of relies on this a lot as you routinely see problems in the 
log regarding renaming of files or deleting of files.

However, if you use the java.nio.file.Files class instead for opening files. 
These methods use FILE_SHARE_DELETE.

I have personally tested this, and I have done some poking around in the 
Cassandra source which leads me to believe that changing over these usages 
would be relatively easy.


> For opening files, change over usages of java.io.* to java.nio.file.Files 
> counterparts to achieve standard behavior with Windows IFS.
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9951
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9951
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Garth Pickell
>
> So in windows, the JVM tends to open files without FILE_SHARE_DELETE when 
> using the older java.io.* components. This, I think, is a problem for 
> Cassandra in that:
> a) it is not standard behavior.
> b) Cassandra kind of relies on this a lot as you routinely see problems in 
> the log regarding renaming of files or deleting of files.
> I don't think this is a bad design by any means, but Windows users will tend 
> to experience many problems in the areas of commit log cleanups and 
> compaction.
> However, if you use the java.nio.file.Files class instead for opening files. 
> These methods use FILE_SHARE_DELETE.
> I have personally tested this, and I have done some poking around in the 
> Cassandra source which leads me to believe that changing over these usages 
> would be relatively easy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to