yuchenhuo commented on a change in pull request #26614: [SPARK-29976] New conf
for single task stage speculation
URL: https://github.com/apache/spark/pull/26614#discussion_r350004865
##########
File path: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
##########
@@ -983,19 +1011,15 @@ private[spark] class TaskSetManager(
// bound based on that.
logDebug("Task length threshold for speculation: " + threshold)
for (tid <- runningTasksSet) {
- val info = taskInfos(tid)
- val index = info.index
- if (!successful(index) && copiesRunning(index) == 1 &&
info.timeRunning(time) > 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))
- foundTasks = true
- }
+ foundTasks |= checkAndSubmitSpeculatableTask(tid, time, threshold)
+ }
+ }
+ if (speculationTaskDurationThresOpt.isDefined) {
Review comment:
There should be a way to combine the two if condition here but might make
the logic a bit more complicated. Not sure if it's worthy to do so.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]