properly shutdown ArteryTransport using CoordinatedShutdown, #22671 (#22698)

* 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:
Patrik Nordwall 2017-04-11 21:48:51 +02:00 committed by GitHub
parent 193e8beb0a
commit 41c756f169
5 changed files with 34 additions and 17 deletions

View file

@ -49,7 +49,7 @@ object ClusterEvent {
/**
* Marker interface for cluster domain events.
*/
sealed trait ClusterDomainEvent
sealed trait ClusterDomainEvent extends DeadLetterSuppression
/**
* Current snapshot state of the cluster. Sent to new subscriber.
@ -198,7 +198,7 @@ object ClusterEvent {
* This event is published when the cluster node is shutting down,
* before the final [[MemberRemoved]] events are published.
*/
final case object ClusterShuttingDown extends ClusterDomainEvent with DeadLetterSuppression
final case object ClusterShuttingDown extends ClusterDomainEvent
/**
* Java API: get the singleton instance of `ClusterShuttingDown` event