Github user markhamstra commented on a diff in the pull request:
https://github.com/apache/spark/pull/1548#discussion_r15289573
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -1202,8 +1202,12 @@ private[scheduler] class
DAGSchedulerEventProcessActor(dagScheduler: DAGSchedule
*/
def receive = {
case JobSubmitted(jobId, rdd, func, partitions, allowLocal, callSite,
listener, properties) =>
- dagScheduler.handleJobSubmitted(jobId, rdd, func, partitions,
allowLocal, callSite,
- listener, properties)
+ new Thread("JobSubmitted for " + jobId) {
+ override def run() {
+ dagScheduler.handleJobSubmitted(jobId, rdd, func, partitions,
allowLocal, callSite,
+ listener, properties)
+ }
+ }.start()
--- End diff --
Starting a new thread within eventProcessorActor to concurrently manipulate
the DAGScheduler's state strikes me as a really bad idea. The actor model and
the DAGScheduler are built around the fundamental assumption that only one
event will be processed at a time. Breaking that model opens us up to numerous
potential race conditions, and I am a long way from being convinced that this
PR is either safe of desirable.
---
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.
---