Github user kayousterhout commented on a diff in the pull request:
https://github.com/apache/spark/pull/16620#discussion_r99661979
--- Diff:
core/src/test/scala/org/apache/spark/scheduler/SchedulerIntegrationSuite.scala
---
@@ -648,4 +661,70 @@ class BasicSchedulerIntegrationSuite extends
SchedulerIntegrationSuite[SingleCor
}
assertDataStructuresEmpty(noFailure = false)
}
+
+ testScheduler("[SPARK-19263] DAGScheduler shouldn't resubmit active
taskSet.") {
+ val a = new MockRDD(sc, 2, Nil)
+ val b = shuffle(2, a)
+ val shuffleId = b.shuffleDeps.head.shuffleId
+
+ def runBackend(): Unit = {
+ val (taskDescription, task) = backend.beginTask()
+ task.stageId match {
+ // ShuffleMapTask
+ case 0 =>
+ val stageAttempt = task.stageAttemptId
+ val partitionId = task.partitionId
+ (stageAttempt, partitionId) match {
+ case (0, 0) =>
+ val fetchFailed = FetchFailed(
+ DAGSchedulerSuite.makeBlockManagerId("hostA"), shuffleId,
0, 0, "ignored")
+ backend.taskFailed(taskDescription, fetchFailed)
+ case (0, 1) =>
+ // Wait until stage resubmission caused by FetchFailed is
finished.
+ waitForCondition(taskScheduler.runningTaskSets.size == 2,
5000,
+ "Wait until stage is resubmitted caused by fetch failed")
+
+ // Task(stageAttempt=0, partition=1) will be bogus, because
both two
+ // tasks(stageAttempt=0, partition=0, 1) run on hostA.
+ // Pending partitions are (0, 1) after stage resubmission,
+ // then change to be 0 after this bogus task.
--- End diff --
This comment is confusing to me, because I'm not sure what "bogus" means in
this context. I think this comment is trying to say that the completion of
this task should be ignored, because it's from an old stage / epoch. If that's
correct, can you change the comment to that?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]