wangshengjie123 commented on code in PR #3118:
URL: https://github.com/apache/celeborn/pull/3118#discussion_r2005291391


##########
assets/spark-patch/Celeborn-Optimize-Skew-Partitions-spark3_5.patch:
##########
@@ -146,15 +146,79 @@ index 89d16e57934..3b9094f3254 100644
  import org.apache.spark.errors.SparkCoreErrors
  import org.apache.spark.executor.{ExecutorMetrics, TaskMetrics}
  import org.apache.spark.internal.Logging
-@@ -1962,7 +1963,7 @@ private[spark] class DAGScheduler(
+@@ -1480,7 +1481,10 @@ private[spark] class DAGScheduler(
+     // The operation here can make sure for the partially completed 
intermediate stage,
+     // `findMissingPartitions()` returns all partitions every time.
+     stage match {
+-      case sms: ShuffleMapStage if stage.isIndeterminate && !sms.isAvailable 
=>
++      case sms: ShuffleMapStage if (stage.isIndeterminate ||
++        
CelebornShuffleState.isCelebornSkewedShuffle(sms.shuffleDep.shuffleId)) && 
!sms.isAvailable =>
++        logInfo(s"Unregistering shuffle output for stage ${stage.id}" +
++          s" shuffle ${sms.shuffleDep.shuffleId}")
+         
mapOutputTracker.unregisterAllMapAndMergeOutput(sms.shuffleDep.shuffleId)
+         sms.shuffleDep.newShuffleMergeState()
+       case _ =>
+@@ -1854,7 +1858,18 @@ private[spark] class DAGScheduler(
+         // tasks complete, they still count and we can mark the corresponding 
partitions as
+         // finished if the stage is determinate. Here we notify the task 
scheduler to skip running
+         // tasks for the same partition to save resource.
+-        if (!stage.isIndeterminate && task.stageAttemptId < 
stage.latestInfo.attemptNumber()) {

Review Comment:
   Done, please take a look thanks @RexXiong 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to