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

    https://github.com/apache/spark/pull/9132#discussion_r42269957
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLListener.scala ---
    @@ -126,7 +126,13 @@ private[sql] class SQLListener(conf: SparkConf) 
extends SparkListener with Loggi
         val stageId = stageSubmitted.stageInfo.stageId
         val stageAttemptId = stageSubmitted.stageInfo.attemptId
         // Always override metrics for old stage attempt
    -    _stageIdToStageMetrics(stageId) = new SQLStageMetrics(stageAttemptId)
    +    if (_stageIdToStageMetrics.contains(stageId)) {
    +      _stageIdToStageMetrics(stageId) = new SQLStageMetrics(stageAttemptId)
    +    } else {
    +      // If a stage belongs to some SQL execution, its stageId will be put 
in "onJobStart".
    +      // Since "_stageIdToStageMetrics" doesn't contain it, it must not 
belong to any SQL execution.
    +      // So we can ignore it.
    --- End diff --
    
    can you add "Otherwise, this may lead to memory leaks (SPARK-11126)"


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to