You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/18 15:07:13 UTC

[GitHub] [spark] Ngone51 commented on a change in pull request #34276: [SPARK-36998][CORE] Handle concurrent eviction of same application in SHS

Ngone51 commented on a change in pull request #34276:
URL: https://github.com/apache/spark/pull/34276#discussion_r731027758



##########
File path: core/src/main/scala/org/apache/spark/deploy/history/HistoryServerDiskManager.scala
##########
@@ -210,7 +210,13 @@ private class HistoryServerDiskManager(
   def committed(): Long = committedUsage.get()
 
   private def deleteStore(path: File): Unit = {
-    FileUtils.deleteDirectory(path)
+    try {
+      FileUtils.deleteDirectory(path)
+    } catch {
+      // Handle simultaneous eviction of the same app
+      case exception: IOException =>
+        if (path.exists()) throw exception;

Review comment:
       Hi, I'm wondering when `path.exists()` returns `true` since we've already got `NoSuchFileException`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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