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 2020/10/20 20:22:57 UTC

[GitHub] [spark] holdenk commented on a change in pull request #30110: [SPARK-33198][CORE] getMigrationBlocks should not fail at missing files

holdenk commented on a change in pull request #30110:
URL: https://github.com/apache/spark/pull/30110#discussion_r508814205



##########
File path: core/src/main/scala/org/apache/spark/shuffle/IndexShuffleBlockResolver.scala
##########
@@ -241,14 +241,16 @@ private[spark] class IndexShuffleBlockResolver(
       val dataBlockData = new FileSegmentManagedBuffer(
         transportConf, dataFile, 0, dataFile.length())
 
-      // Make sure the files exist
-      assert(indexFile.exists() && dataFile.exists())
+      // Make sure the index exist.
+      if (!indexFile.exists()) {
+        throw new FileNotFoundException("Index file is deleted already.")
+      }
 
       List((indexBlockId, indexBlockData), (dataBlockId, dataBlockData))

Review comment:
       If the data file does not exist should we just return the list with the index file?




----------------------------------------------------------------
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.

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