If you lose instances that have shuffle outputs, you will start observing messages like:
17/03/24 11:49:23 WARN TaskSetManager: Lost task 0.0 in stage 64.1 (TID 3849, 126.96.36.199, executor 0): FetchFailed(BlockManagerId(4, 188.8.131.52, 4048, None), shuffleId=16, mapId=2, reduceId=3, message=
Generally, these messages are followed by:
17/03/24 11:49:23 INFO DAGScheduler: Executor lost: 4 (epoch 20)
17/03/24 11:49:23 INFO BlockManagerMasterEndpoint: Trying to remove executor 4 from BlockManagerMaster.
17/03/24 11:49:23 INFO BlockManagerMaster: Removed 4 successfully in removeExecutor
17/03/24 11:49:23 INFO DAGScheduler: Shuffle files lost for executor: 4 (epoch 20)
17/03/24 11:49:23 INFO ShuffleMapStage: ShuffleMapStage 63 is now unavailable on executor 4 (73/89, false)
which is great. Spark resubmits tasks for data that has been lost. However, if you have cascading instance failures, then you may come across:
17/03/24 11:48:39 INFO DAGScheduler: Ignoring fetch failure from ResultTask(64, 46) as it's from ResultStage 64 attempt 0 and there is a more recent attempt for that stage (attempt ID 1) running
which don't invalidate file outputs. In later retries of the stage, Spark will attempt to access files on machines that don't exist anymore, and then after 4 tries, Spark will give up. If it had not ignored the fetch failure, and invalidated the cache, then most of the lost files could have been computed during one of the previous retries.