sadikovi commented on code in PR #60149:
URL: https://github.com/apache/spark/pull/60149#discussion_r4508145401
##########
core/src/main/scala/org/apache/spark/MapOutputTracker.scala:
##########
@@ -912,7 +930,9 @@ private[spark] class MapOutputTrackerMaster(
.getOrElse(Seq.empty[BlockManagerId]))
}
} catch {
- case NonFatal(e) => logError(log"${MDC(ERROR, e.getMessage)}", e)
+ case NonFatal(e) =>
Review Comment:
Fixed in d1f7579. `MessageLoop` now also catches non-`NonFatal` throwables:
it logs, calls `replyFailure`, then rethrows, matching what `Inbox.process`
does. A fatal error still ends that loop as before, but the waiting request
gets the error first. Added the regression test "master replies with a failure
when the handler throws a fatal error" (a `LinkageError` thrown from `reply`);
it fails without the change and passes with it.
##########
core/src/test/scala/org/apache/spark/MapOutputTrackerSuite.scala:
##########
@@ -208,6 +208,90 @@ class MapOutputTrackerSuite extends SparkFunSuite with
LocalSparkContext {
rpcEnv.shutdown()
}
+ // SPARK-60950: tests post directly to the master's MessageLoop, bypassing
the endpoint, so
+ // that the exception is thrown on the dispatcher thread rather than inside
the RPC Inbox (which
Review Comment:
Fixed in d1f7579. The comment now says that for these request kinds the
handler runs on a `map-output-dispatcher` `MessageLoop` thread on both routes,
and that the tests post directly only to drive the loop with mocked call
contexts without an `RpcEnv`. On the `withClue` question: you were right, the
clue does not reach Mockito failures. I dropped the wrappers and named each
mock after its request kind, so a failure now reads e.g.
`GetMapOutputMessage.sendFailure(...)`.
--
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]