Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5777#discussion_r195370225
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/blob/TransientBlobCleanupTask.java
 ---
    @@ -100,9 +102,15 @@ public void run() {
                                writeLock.lock();
     
                                try {
    -                                   if (!localFile.delete() && 
localFile.exists()) {
    -                                           log.warn("Failed to locally 
delete blob " + localFile.getAbsolutePath());
    -                                   } else {
    +                                   try {
    +                                           
Files.delete(localFile.toPath());
    +                                   } catch (IOException e) {
    +                                           log.error("Failed to delete 
locally blob " + localFile.getAbsolutePath(), e);
    +                                   } catch (Exception e) {
    +                                           log.error("Failed to delete 
locally blob " + localFile.getAbsolutePath(), e);
    +                                   }
    +
    +                                   if (!localFile.exists()) {
    --- End diff --
    
    Is there any cause that this check is required here? Why not just remove 
the entry after `Files.delete(...)` at the end of the `try` block


---

Reply via email to