viirya commented on a change in pull request #34265:
URL: https://github.com/apache/spark/pull/34265#discussion_r728597530
##########
File path: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
##########
@@ -962,6 +1002,11 @@ private[spark] class DAGScheduler(
throw SparkCoreErrors.cannotRunSubmitMapStageOnZeroPartitionRDDError()
}
+ // SPARK-23626: `RDD.getPartitions()` can be slow, so we eagerly compute
+ // `.partitions` on every RDD in the DAG to ensure that `getPartitions()`
+ // is evaluated outside of the DAGScheduler's single-threaded event loop:
+ eagerlyComputePartitionsForRddAndAncestors(rdd)
+
Review comment:
Looks like before the three places calling
`eagerlyComputePartitionsForRddAndAncestors`, there are some checks for
`rdd.partitions`, so actually we just (need) compute its ancestors?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]