Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5636#discussion_r35590423
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/Stage.scala ---
    @@ -76,6 +76,33 @@ private[spark] abstract class Stage(
        */
       private var _latestInfo: StageInfo = StageInfo.fromStage(this, 
nextAttemptId)
     
    +  /**
    +   * Spark is resilient to executors dying by retrying stages on 
FetchFailures. Here, we keep track
    +   * of the number of stage failures to prevent endless stage retries.
    +   */
    +  private var failedStageCount = 0
    +
    +  private[scheduler] def clearFailures() : Unit = {
    +    failedStageCount = 0
    +  }
    +
    +  /**
    +   * Check whether we should abort the failedStage due to multiple 
failures.
    +   * This method updates the running count of failures for a particular 
stage and returns
    +   * true if the number of failures exceeds the allowable number of 
failures.
    +   */
    +  private[scheduler] def failAndShouldAbort(): Boolean = {
    +    // We increment the failure count on the first attempt for a 
particular Stage
    +    if (_latestInfo.attemptId == 0)
    +    {
    +      failedStageCount += 1
    +    }
    --- End diff --
    
    just re-read previous comments, kay had suggested that whatever failure 
tracking we do has "fetch" in the name, which I agree with, so I guess 
`attemptsWithFetchFailures: Set[Int]`?  similarly I'd rename the method to be 
clear that it has to do with a fetch failure.


---
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]

Reply via email to