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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to