jerrypeng commented on code in PR #42352:
URL: https://github.com/apache/spark/pull/42352#discussion_r1566267014


##########
core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala:
##########
@@ -916,8 +1040,13 @@ private[spark] class ExecutorAllocationManager(
       attempts.count(attempt => unschedulableTaskSets.contains(attempt))
     }
 
+    /**
+     * Will account for only pending tasks and speculative tasks of a current 
stage.
+     * Will also account for pending tasks from other stages if enabled for 
streaming use case.
+     * i.e if `spark.dynamicAllocation.streaming.enabled` is enabled.
+     */
     def hasPendingTasks: Boolean = {
-      hasPendingSpeculativeTasks || hasPendingRegularTasks
+      hasPendingSpeculativeTasks || hasPendingRegularTasks || 
hasPendingTasksFromOtherStagesOfTheJob

Review Comment:
   Can you only check "hasPendingTasksFromOtherStagesOfTheJob" if 
"streamingDRAFeatureEnabled" is enabled?



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to