Ngone51 commented on code in PR #38702:

@@ -645,8 +645,11 @@ private[spark] class AppStatusListener(
   override def onTaskEnd(event: SparkListenerTaskEnd): Unit = {
-    // TODO: can this really happen?
-    if (event.taskInfo == null) {
+    // TODO: can taskInfo null really happen?
+    // For resubmitted tasks caused by ExecutorLost, the SparkListenerTaskEnd 
is useless and
+    // will make activeTask in stage to be negative, this will cause stage not 
be removed in
+    // liveStages, and finally cause executor not removed in deadExecutors
+    if (event.taskInfo == null ||  event.reason == Resubmitted) {

Review Comment:
   @wineternity  Thanks for the detailed analysis. Seems like the only metric 
that the `Resubmmitted` task end event could affect is the failed/completed 
tasks counters. And other metrics like executor summary, and shuffle read/write 
metrics are duplicated. So I tend to agree to recognize the `Resubmmitted` task 
end event as a signal rather than a real task end event. 
   @mridulm WDYT?

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:

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to