mridulm commented on code in PR #42950: URL: https://github.com/apache/spark/pull/42950#discussion_r1334896106
########## core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala: ########## @@ -1903,13 +1903,20 @@ private[spark] class DAGScheduler( case smt: ShuffleMapTask => val shuffleStage = stage.asInstanceOf[ShuffleMapStage] - shuffleStage.pendingPartitions -= task.partitionId + // Ignore task completion for old attempt of indeterminate stage + val ignoreIndeterminate = stage.isIndeterminate && + task.stageAttemptId < stage.latestInfo.attemptNumber() + if (!ignoreIndeterminate) { + shuffleStage.pendingPartitions -= task.partitionId + } val status = event.result.asInstanceOf[MapStatus] val execId = status.location.executorId logDebug("ShuffleMapTask finished on " + execId) if (executorFailureEpoch.contains(execId) && smt.epoch <= executorFailureEpoch(execId)) { logInfo(s"Ignoring possibly bogus $smt completion from executor $execId") Review Comment: So this is kind of funny - take a look at what the above replaced @cloud-fan : https://github.com/apache/spark/pull/16620/files#diff-85de35b2e85646ed499c545a3be1cd3ffd525a88aae835a9c621f877eebadcb6R1183 :-) Both of these actually do not account for DETERMINATE/INDETERMINATE changes we made subsequently. IMO, for INDETERMINATE stages, we should ignore task completion events from previous attempts - since we have already cancelled the stage attempt. Having said that, I have not thought through the nuances here. +CC @jiangxb1987 as well -- 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