Ngone51 commented on code in PR #36162: URL: https://github.com/apache/spark/pull/36162#discussion_r896402450
########## core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala: ########## @@ -1069,25 +1084,56 @@ private[spark] class TaskSetManager( * Check if the task associated with the given tid has past the time threshold and should be * speculative run. */ - private def checkAndSubmitSpeculatableTask( - tid: Long, + private def checkAndSubmitSpeculatableTasks( currentTimeMillis: Long, - threshold: Double): Boolean = { - val info = taskInfos(tid) - val index = info.index - if (!successful(index) && copiesRunning(index) == 1 && - info.timeRunning(currentTimeMillis) > threshold && !speculatableTasks.contains(index)) { - addPendingTask(index, speculatable = true) - logInfo( - ("Marking task %d in stage %s (on %s) as speculatable because it ran more" + - " than %.0f ms(%d speculatable tasks in this taskset now)") - .format(index, taskSet.id, info.host, threshold, speculatableTasks.size + 1)) - speculatableTasks += index - sched.dagScheduler.speculativeTaskSubmitted(tasks(index)) - true - } else { - false + threshold: Double, + numSuccessfulTasks: Int, Review Comment: not used? -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org 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