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

Chris Nauroth updated HDFS-4752:
--------------------------------

    Attachment: HDFS-4752.1.patch

I'm attaching a patch that overrides the datanode behavior to open the block 
and meta files with share delete permission via a JNI call on Windows.

This is a bit messy, so I'm curious to get feedback.  We've solved similar 
problems in the past by stopping the daemon that holds the file opened before 
corrupting the underlying files, but in this case, stopping the daemon would 
ruin the intent of the test.  I also didn't think it was correct in general to 
use share delete here, so I triggered the logic from a new config flag that is 
only set to true by this test.

I verified that the test passes on Mac and Windows.

                
> TestRBWBlockInvalidation fails on Windows due to file locking
> -------------------------------------------------------------
>
>                 Key: HDFS-4752
>                 URL: https://issues.apache.org/jira/browse/HDFS-4752
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode, test
>    Affects Versions: 3.0.0
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HDFS-4752.1.patch
>
>
> The test attempts to invalidate a block by deleting its block file and meta 
> file.  This happens while a datanode thread holds the files open for write.  
> On Windows, this causes a locking conflict, and the test fails.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to