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

Joshua McKenzie commented on CASSANDRA-7195:
--------------------------------------------

Looks like File.exists() in java will return false if you don't have 
permissions to a file or if a file is pending deletion on windows.  Some 
digging turned up 
[this|http://stackoverflow.com/questions/3764072/c-win32-how-to-wait-for-a-pending-delete-to-complete].
  I ran a process monitor trace against the ColumnFamilyStore test and see the 
following during the test when I try to access the file to query permissions 
and/or list() against the directories for the cfs:

{code:title=procmon trace}
Time of Day     Process Name    PID     Operation       Path    Result  Detail
7:05:20.5037259 PM      java.exe        6452    CreateFile      
C:\vm-shared\src\cassandra\build\test\cassandra\data\Keyspace1\Standard1-9534df30dbc411e39fdca15d6073f683\Keyspace1-Standard1-ka-10-Index.db
    DELETE PENDING  Desired Access: Read Attributes, Disposition: Open, 
Options: Open For Backup, Open Reparse Point, Attributes: n/a, ShareMode: Read, 
Write, Delete, AllocationSize: n/a
7:05:20.5038437 PM      java.exe        6452    CreateFile      
C:\vm-shared\src\cassandra\build\test\cassandra\data\Keyspace1\Standard1-9534df30dbc411e39fdca15d6073f683\Keyspace1-Standard1-ka-10-Index.db
    DELETE PENDING  Desired Access: Read Attributes, Disposition: Open, 
Options: Open For Backup, Open Reparse Point, Attributes: n/a, ShareMode: Read, 
Write, Delete, AllocationSize: n/a
7:05:20.5039463 PM      java.exe        6452    CreateFile      
C:\vm-shared\src\cassandra\build\test\cassandra\data\Keyspace1\Standard1-9534df30dbc411e39fdca15d6073f683\Keyspace1-Standard1-ka-10-Index.db
    DELETE PENDING  Desired Access: Read Attributes, Disposition: Open, 
Options: Open For Backup, Open Reparse Point, Attributes: n/a, ShareMode: Read, 
Write, Delete, AllocationSize: n/a
7:05:24.5878300 PM      java.exe        6452    CreateFile      
C:\vm-shared\src\cassandra\build\test\cassandra\data\Keyspace1\Standard1-9534df30dbc411e39fdca15d6073f683\Keyspace1-Standard1-ka-10-Index.db
    DELETE PENDING  Desired Access: Read Attributes, Disposition: Open, 
Options: Open For Backup, Open Reparse Point, Attributes: n/a, ShareMode: Read, 
Write, Delete, AllocationSize: n/a
7:05:26.8545512 PM      java.exe        6452    CloseFile       
C:\vm-shared\src\cassandra\build\test\cassandra\data\Keyspace1\Standard1-9534df30dbc411e39fdca15d6073f683\Keyspace1-Standard1-ka-10-Index.db
    SUCCESS 
{code}

This is consistently happening against a specific ka-10 idx and data file.  
Another interesting point is that on the 1/10 runs that succeed, I see an 
SSTableDeletingTask for that file whereas I *don't* see a deleting task on runs 
that fail.


> ColumnFamilyStoreTest unit tests fails on Windows
> -------------------------------------------------
>
>                 Key: CASSANDRA-7195
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7195
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Joshua McKenzie
>            Assignee: Joshua McKenzie
>            Priority: Minor
>              Labels: Windows
>             Fix For: 3.0
>
>
> Looks like files aren't getting deleted correctly during 
> testLoadNewSSTablesAvoidsOverwrites during a sanity check.  Test passes on 
> linux.



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

Reply via email to