zeruibao commented on code in PR #58089:
URL: https://github.com/apache/spark/pull/58089#discussion_r3809934955
##########
core/src/main/scala/org/apache/spark/shuffle/streaming/StreamingShuffleWriter.scala:
##########
@@ -257,11 +280,27 @@ class StreamingShuffleWriter[K, V](
val newFuture = future.whenComplete { (client, ex) =>
ex match {
case null => sendToClient(client)
- case _ => buf.release(); done()
+ case error =>
+ buf.release()
+ errorNotifier.markError(error match {
+ case completionException: CompletionException
+ if completionException.getCause != null =>
+ completionException.getCause
+ case _ => error
+ })
+ done()
}
}
// Once the future is completed, stop accumulating CompletionStages.
- client = if (newFuture.isDone) Left(newFuture.join()) else
Right(newFuture)
+ if (newFuture.isDone) {
+ if (newFuture.isCompletedExceptionally) {
+ // Surface the categorized error instead of the
CompletionException from join().
+ throwErrorIfExists()
+ }
+ client = Left(newFuture.join())
Review Comment:
yeah, I agree it would be nicer.
--
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]