Hi,
Akka has a setting (shutdown-after-unsuccessful-join-seed-nodes) for
shutting nodes if they fails to join the seed node. A slightly more
detailed discussion can be found here.
https://github.com/akka/akka/issues/23502
However, after joining the cluster (aka - getting a response from one
seed), a node can still fail to reach a MemberUp status. For example, if
the node joins while there is a split brain, one of the leaders will
shutdown part of the cluster, but the Joining node may still not be visible
to that leader so it will remaing hanging forever.
Is there a setting to autoshoutdown in this case? If not, are there any
corener cases where doing this will not be advisable?
I was thinking of just implemeting the logic myself:
class Whatcher extends Actor with ActorLogging{
override def preStart(): Unit = {
log.info("Starting member state listener for [{}]", cluster.selfUniqueAddress)
super.preStart()
cluster.subscribe(self, initialStateMode = InitialStateAsEvents,
classOf[ClusterDomainEvent])
cancellable = Some(context.system.scheduler.schedule(Timeout, Timeout, self,
Tick))
}
override def receive = starting
def starting: Actor.Receive = {
case MemberUp(member) if member.uniqueAddress == cluster.selfUniqueAddress
=> become(started)
case Tick =>
CoordinatedShutdown(context.system).run(CoordinatedShutdown.ClusterDowningReason)
}
def started:Actor.Receive = {...}
}
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.