flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5659) FileBaseUtils#deleteFileOrDirectory not thread-safe on Windows
Date Thu, 26 Jan 2017 15:16:24 GMT

    [ https://issues.apache.org/jira/browse/FLINK-5659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15839839#comment-15839839

ASF GitHub Bot commented on FLINK-5659:

Github user StephanEwen commented on the issue:

    Uff, okay, I see the problem. Windows FileSystem semantics are not as easy to handle as
    How about we special case the method for Windows? Use `OperatingSystem.isWindows()` and
in that case, do it different (like you suggested), but keep the Unix code path as it is?

> FileBaseUtils#deleteFileOrDirectory not thread-safe on Windows
> --------------------------------------------------------------
>                 Key: FLINK-5659
>                 URL: https://issues.apache.org/jira/browse/FLINK-5659
>             Project: Flink
>          Issue Type: Bug
>    Affects Versions: 1.2.0, 1.3.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Trivial
> The {code}FileBaseUtils#deleteFileOrDirectory{code} is not thread-safe on Windows.
> First you will run into AccessDeniedExceptions since one thread tried to delete a file
while another thread was already doing that, for which the file has to be opened.
> Once you resolve those exceptions (by catching them double checking whether the file
still exists), you run into DirectoryNotEmptyExceptions since there is some wacky timing/visibility
issue when deleting files concurrently.

This message was sent by Atlassian JIRA

View raw message