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

    https://github.com/apache/spark/pull/16989#discussion_r115411681
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala 
---
    @@ -154,15 +164,24 @@ final class ShuffleBlockFetcherIterator(
         while (iter.hasNext) {
           val result = iter.next()
           result match {
    -        case SuccessFetchResult(_, address, _, buf, _) =>
    +        case SuccessFetchResult(_, address, size, buf, _) =>
               if (address != blockManager.blockManagerId) {
                 shuffleMetrics.incRemoteBytesRead(buf.size)
                 shuffleMetrics.incRemoteBlocksFetched(1)
               }
               buf.release()
    +          freeMemory(size)
             case _ =>
           }
         }
    +    shuffleFiles.foreach { shuffleFile =>
    +      try {
    +        shuffleFile.delete()
    +      } catch {
    +        case ioe: IOException =>
    +          logError(s"Failed to cleanup ${shuffleFile.getAbsolutePath}.", 
ioe)
    --- End diff --
    
    `IOException` is not thrown by delete - but it can return `false` to 
indicate delete failure.
    The log message (INFO would do btw) should be on `delete()` returning 
`false`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to