Actually this is the same filter used in "findTaskFromList". TaskSetManager will re-add failed task to pending lists, so it can have the updated executor availability. For speculative task, TaskSetManager won't check the availability of executors in "findSpeculativeTask". Please correct me if I misunderstand anything.