-
- Downloads
[SPARK-14699][CORE] Stop endpoints before closing the connections and don't stop client in Outbox
## What changes were proposed in this pull request? In general, `onDisconnected` is for dealing with unexpected network disconnections. When RpcEnv.shutdown is called, the disconnections are expected so RpcEnv should not fire these events. This PR moves `dispatcher.stop()` above closing the connections so that when stopping RpcEnv, the endpoints won't receive `onDisconnected` events. In addition, Outbox should not close the client since it will be reused by others. This PR fixes it as well. ## How was this patch tested? test("SPARK-14699: RpcEnv.shutdown should not fire onDisconnected events") Author: Shixiong Zhu <shixiong@databricks.com> Closes #12481 from zsxwing/SPARK-14699.
Showing
- core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala 3 additions, 3 deletions...c/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala
- core/src/main/scala/org/apache/spark/rpc/netty/Outbox.scala 1 addition, 4 deletionscore/src/main/scala/org/apache/spark/rpc/netty/Outbox.scala
- core/src/test/scala/org/apache/spark/rpc/RpcEnvSuite.scala 27 additions, 1 deletioncore/src/test/scala/org/apache/spark/rpc/RpcEnvSuite.scala
Loading
Please register or sign in to comment