Github user markhamstra commented on a diff in the pull request: https://github.com/apache/spark/pull/17297#discussion_r107044660 --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala --- @@ -929,12 +946,22 @@ class DAGScheduler( } } - /** Called when stage's parents are available and we can now do its task. */ + /** + * Called when stage's parents are available and we can now run its task. + * This only submits the partitions which are missing and have not been + * submitted to the lower-level scheduler for execution. + */ private def submitMissingTasks(stage: Stage, jobId: Int) { logDebug("submitMissingTasks(" + stage + ")") - // First figure out the indexes of partition ids to compute. - val partitionsToCompute: Seq[Int] = stage.findMissingPartitions() + val missingPartitions = stage.findMissingPartitions() + val partitionsToCompute = + missingPartitions.filter(id => !stage.pendingPartitions.contains(id)) --- End diff -- ```scala missingPartitions.filterNot(stage.pendingPartitions) ```
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org