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

    https://github.com/apache/spark/pull/9274#discussion_r42955382
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -949,7 +949,13 @@ class DAGScheduler(
         // serializable. If tasks are not serializable, a 
SparkListenerStageCompleted event
         // will be posted, which should always come after a corresponding 
SparkListenerStageSubmitted
         // event.
    -    outputCommitCoordinator.stageStart(stage.id)
    +    stage match {
    +      case s: ShuffleMapStage =>
    +        outputCommitCoordinator.stageStart(stage = s.id, maxPartitionId = 
s.numPartitions - 1)
    +      case s: ResultStage =>
    +        outputCommitCoordinator.stageStart(
    +          stage = s.id, maxPartitionId = s.rdd.partitions.length - 1)
    --- End diff --
    
    This result stage case is trickier: for the cases where the 
OutputCommitCoordinator actually gets invoked, I think it's generally the case 
that all partitions are being computed, but I guess it's hypothetically 
possible that a result stage could write results for only one of the RDD's 
partitions. In this case, I think the partition ids can be larger than 
`numPartitions - 1` (see the constructor of ResultStage to see this).


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