You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/03 03:01:47 UTC
[GitHub] [spark] wzhfy commented on a change in pull request #29580: [SPARK-32738][CORE] Should reduce the number of active threads if fatal error happens in `Inbox.process`
wzhfy commented on a change in pull request #29580:
URL: https://github.com/apache/spark/pull/29580#discussion_r482674374
##########
File path: core/src/main/scala/org/apache/spark/rpc/netty/Inbox.scala
##########
@@ -200,6 +200,16 @@ private[netty] class Inbox(val endpointName: String, val endpoint: RpcEndpoint)
* Calls action closure, and calls the endpoint's onError function in the case of exceptions.
*/
private def safelyCall(endpoint: RpcEndpoint)(action: => Unit): Unit = {
+ def dealWithFatalException(fatal: Throwable): Unit = {
+ inbox.synchronized {
+ // Should reduce the number of active threads before throw exception
+ if (numActiveThreads != 0) {
Review comment:
Yes logically this check is not necessary, I add it only for safety since we are going to minus the value.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org