Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/7385#discussion_r34533502
--- Diff: core/src/main/scala/org/apache/spark/scheduler/JobWaiter.scala ---
@@ -28,12 +31,18 @@ private[spark] class JobWaiter[T](
resultHandler: (Int, T) => Unit)
extends JobListener {
+ private val promise = Promise[Unit]
+
private var finishedTasks = 0
// Is the job as a whole finished (succeeded or failed)?
@volatile
private var _jobFinished = totalTasks == 0
+ if (_jobFinished) {
--- End diff --
@zsxwing, this `if` statement fixes a subtle bug that we found in your
JobWaiter future: if a job has no tasks, then it is marked as finished
immediately and `taskSucceeded` will not be called, so we need to complete the
promise here. We noticed this because a test in AsyncRDDActionsSuite was
hanging.
---
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]