* properly shutdown ArteryTransport using CoordinatedShutdown, #22671 * The shutdownHook changed hasBeenShutdown flag to true, and then when the transport.shutdown was invoked the shutdown sequence was ignored until it was too late, ActorSystem already terminated. * Also improved the cluster shutdown tasks when the cluster node had not joined * CoordinatedShutdownLeave explicit events
This commit is contained in:
parent
193e8beb0a
commit
41c756f169
5 changed files with 34 additions and 17 deletions
|
|
@ -299,7 +299,10 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef) extends Actor with
|
|||
val selfExiting = Promise[Done]()
|
||||
val coordShutdown = CoordinatedShutdown(context.system)
|
||||
coordShutdown.addTask(CoordinatedShutdown.PhaseClusterExiting, "wait-exiting") { () ⇒
|
||||
selfExiting.future
|
||||
if (latestGossip.members.isEmpty)
|
||||
Future.successful(Done) // not joined yet
|
||||
else
|
||||
selfExiting.future
|
||||
}
|
||||
coordShutdown.addTask(CoordinatedShutdown.PhaseClusterExitingDone, "exiting-completed") {
|
||||
val sys = context.system
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue