Raviston6296 commented on PR #58437:
URL: https://github.com/apache/spark/pull/58437#issuecomment-6711788369

   I went through the current head (96661c42db0) with a focus on what changes 
for an application whose `ShuffleDriverComponents.supportsReliableStorage()` 
already returns `true` and whose handles leave `reliablyStored` as `None`. The 
description says that behavior only changes for a `ShuffleManager` that sets 
the new field. From the code, I think that case does change:
   
   1. **Worker removal and `FetchFailed` now keep other shuffles' output for 
global-reliable apps.** On master, `supportsReliableStorage()` is consulted 
only in `handleExecutorLost` (via `fileLost`) and in `TaskSetManager`. 
`handleWorkerRemoved` calls `removeOutputsOnHost(host)` unconditionally, and 
`unregisterOutputsOnFetchFailedExecutor` passes `fileLost = true`, so both drop 
every shuffle's output on the executor or host, even when the global flag is 
`true`. With this PR, every shuffle of such an app is registered with 
`isReliablyStored = None.getOrElse(true)`. Both paths pass 
`respectReliablyStored = true`, so worker removal keeps everything, and a 
`FetchFailed` clears only the failed shuffle. That fits the 
`supportsReliableStorage()` Javadoc ("external to the lifecycle of the executor 
host"), so it may well be intended. But it is a behavior change for existing 
plugins, so it would be good to note it in the description and cover it with a 
test using `TestShuffleDataIOWithReliable
 Storage` and a `None` handle. As far as I can see, the new tests with the 
global flag `true` all use a `Some(false)` handle.
   
   2. **New epoch bumps on executor loss for global-reliable apps.** On master, 
with the global flag `true`, `handleExecutorLost` computes `fileLost = false`, 
so it never reaches `removeOutputsOnExecutor`, and the epoch doesn't move (the 
only increments are inside the tracker's remove methods). With this PR, 
`fileLost` is `!externalShuffleServiceEnabled`, which is `true` in the usual 
remote-shuffle setup. So every executor loss now scans all shuffle statuses 
(under each `ShuffleStatus` write lock, even on the preserve path, which only 
reads). And per `shouldBumpEpoch = metadataChanged || !preservedReliable`, 
every executor that holds no map output now bumps the epoch, so all executors 
drop their cached map statuses and refetch. Idle executors removed by dynamic 
allocation often hold no output. The "no-op loss still bumps for fencing" 
reasoning in the thread with @cloud-fan holds for apps that were already 
cleaning up. But these apps never bumped here before. Could the bump be limited
  to shuffles that are not reliably stored (for example, skip it when nothing 
unreliable is registered, using `hasUnreliablyStoredShuffle`), so existing 
global-reliable apps keep today's behavior?
   
   3. **Unrelated comment changes in `DAGScheduler`.** Commit 348f96f3d1c 
("Simplify verbose comments across the reliable-shuffle changes") also rewrites 
or removes comments on pipelined-shuffle code that this PR doesn't otherwise 
touch: `classifyJobShuffleShape`, `pipelinedManagerWantsLiveReduceHints`, 
`liveReduceSet`, `rddReachesShuffle`, `pipelinedJobConcurrentTaskDemand`, the 
shape-rejection and gang-admission blocks in `handleJobSubmitted`, and the 
`outputTracker` `None` note in `createShuffleMapStage`. That accounts for most 
of the `-144` lines in `DAGScheduler.scala`, and some information is dropped, 
e.g. why the point-in-time materialization check is safe (single-executor local 
mode, and the whole-group abort on `FetchFailed`). Could those hunks be 
reverted, so the diff covers only the reliable-storage change and the pipelined 
comments stay as their authors wrote them?
   
   4. **Minor API point.** `ShuffleHandle` is a `@DeveloperApi` that external 
managers also implement in Java, e.g. Uniffle's `RssShuffleHandle`. There, 
`Option[Boolean]` shows up as `scala.Option<Object>`, which is awkward to 
override correctly. The rest of the plugin surface 
(`ShuffleDriverComponents.supportsReliableStorage()`) is Java-first, so would a 
Java-friendly shape be worth considering, e.g. a `java.util.Optional<Boolean>` 
or a small enum?
   


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