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

    https://github.com/apache/spark/pull/1362#discussion_r15040670
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -1107,7 +1106,6 @@ class DAGScheduler(
                 case shufDep: ShuffleDependency[_, _, _] =>
                   val mapStage = getShuffleMapStage(shufDep, stage.jobId)
                   if (!mapStage.isAvailable) {
    -                visitedStages += mapStage
    --- End diff --
    
    Maybe this is an opportunity for me to get some scala education.  I can see 
that, in this stageDependsOn function, the visitedRdds val is used to prevent 
re-visiting an RDD, but I only see two uses of _visitedStages_.  visitedStages 
is constructed, and then stages are added to it.  I’m not seeing how 
visitedStages is being used.  Is there some sort of callback when a stage is 
added to this HashSet?  I’m an admitted scala novice, so please let me know 
if there’s some magic going on or I’m being dense here :)
    
    Because I didn’t see how visitedStages was being used, I removed this 
variable in my “Remove unused variable.” commit.  I’ll go ahead and 
withdraw that commit for now.  If the variable is in fact in use, I’d love to 
learn understand that better.


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

Reply via email to