cloud-fan commented on code in PR #58437:
URL: https://github.com/apache/spark/pull/58437#discussion_r4505326651


##########
core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala:
##########
@@ -4674,27 +4715,42 @@ private[spark] class DAGScheduler(
       clearCacheLocs()
     }
     if (fileLost) {
-      // When the fetch failure is for a merged shuffle chunk, 
ignoreShuffleFileLostEpoch is true
-      // and so all the files will be removed.
-      val remove = if (ignoreShuffleFileLostEpoch) {
-        true
-      } else if (!shuffleFileLostEpoch.contains(execId) ||
-        shuffleFileLostEpoch(execId) < currentEpoch) {
-        shuffleFileLostEpoch(execId) = currentEpoch
-        true
-      } else {
-        false
+      // ignoreShuffleFileLostEpoch (merged-chunk failure) removes everything 
past the gate. A
+      // FetchFailed for a reliably-stored shuffle is exempt once per epoch: 
the executor loss
+      // preserved it, so the executor fence would otherwise skip clearing it 
now proven gone.
+      val reliableFetchFailedBypass = failedShuffleId.exists { id =>
+        mapOutputTracker.isReliablyStored(id) &&
+          reliableShuffleFileLostEpoch.get((execId, id)).forall(_ < 
currentEpoch)

Review Comment:
   Thanks, the executor fence can no longer move backward. This review raises a 
related point: the bypass records the per-shuffle fence at the straggler's own 
task epoch rather than at the executor fence it bypassed, so a later straggler 
for the same shuffle can be admitted again.
   
   <!-- SPARK_DEV_REVIEW_REPLY 
{"feedback_id":"inline:4085168428","thread_id":"inline:4085168428","verdict_sha256":"3d53a51cbd0aca9006e6c94d100e248a1659492e1b8c4b3c08bcd77a60d3dbee"}
 -->



##########
core/src/main/scala/org/apache/spark/shuffle/ShuffleHandle.scala:
##########
@@ -25,4 +25,15 @@ import org.apache.spark.annotation.DeveloperApi
  * @param shuffleId ID of the shuffle
  */
 @DeveloperApi
-abstract class ShuffleHandle(val shuffleId: Int) extends Serializable {}
+abstract class ShuffleHandle(val shuffleId: Int) extends Serializable {
+  /**
+   * Whether this shuffle's output is stored reliably, off the executor that 
produced it (e.g. a
+   * remote shuffle service or distributed filesystem). When true, losing the 
executor or its host
+   * does not lose the output, so its map outputs are not unregistered on 
executor/worker loss.
+   *
+   * Per-shuffle override of the app-global 
`ShuffleDriverComponents.supportsReliableStorage()`:

Review Comment:
   Thanks, let's keep the stack. No in-tree handle returns Some(false) yet, the 
gap costs recomputation rather than stale output, and the per-shuffle registry 
and hasUnreliablyStoredShuffle are already in place for the follow-ups. Please 
land #58687 and #59083 in the same release as this PR, so the ShuffleHandle 
promise that Some(value) is authoritative holds for every consumer when it 
ships.
   
   <!-- SPARK_DEV_REVIEW_REPLY 
{"feedback_id":"inline:4085168311","thread_id":"inline:4085168311","verdict_sha256":"3d53a51cbd0aca9006e6c94d100e248a1659492e1b8c4b3c08bcd77a60d3dbee"}
 -->



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to