pekko/akka-cluster
Patrik Nordwall f6ceb4d49a
Flush messages before DeathWatchNotification, #28695 (#28940)
* Since DeathWatchNotification is sent over the control channel it may overtake
  other messages that have been sent from the same actor before it stopped.
* It can be confusing that Terminated can't be used as an end-of-conversation marker.
* In classic Remoting we didn't have this problem because all messages were sent over
  the same connection.

* don't send DeathWatchNotification when system is terminating
* when using Cluster we can rely on that the other side will publish AddressTerminated
  when the member has been removed
* it's actually already a race condition that often will result in that the DeathWatchNotification
  from the terminating side
  * in DeathWatch.scala it will remove the watchedBy when receiving AddressTerminated, and that
    may (sometimes) happen before tellWatchersWeDied

* same for Unwatch
* to avoid sending many Unwatch messages when watcher's ActorSystem is terminated
* same race exists for Unwatch as for DeathWatchNotification, if RemoteWatcher publishAddressTerminated
  before the watcher is terminated

* config for the flush timeout, and possibility to disable
2020-07-03 09:54:35 +02:00
..
jmx-client Allow multiple Cluster JMX MBeans in the same JVM (#22484) 2017-03-14 14:31:58 +01:00
src Flush messages before DeathWatchNotification, #28695 (#28940) 2020-07-03 09:54:35 +02:00