prakharjain09 commented on a change in pull request #28619: URL: https://github.com/apache/spark/pull/28619#discussion_r440206799
########## File path: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala ########## @@ -1042,7 +1046,19 @@ private[spark] class TaskSetManager( // bound based on that. logDebug("Task length threshold for speculation: " + threshold) for (tid <- runningTasksSet) { - foundTasks |= checkAndSubmitSpeculatableTask(tid, time, threshold) + var speculated = checkAndSubmitSpeculatableTask(tid, time, threshold) + if (!speculated && tidToExecutorKillTimeMapping.contains(tid)) { Review comment: Yes - We can store executorToKillTimeMapping also. In that case, we have to clean the map when executor is removed. For that we may have to make changes to pass "removeExecutor" signal till TaskSetManager. I didn't see much difference in both the approaches as total entries we will be creating for a given executor in current approach will be equal to total tasks running for that executor (which shouldn't be a lot). ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org