Skip to content
This repository has been archived by the owner on Apr 15, 2018. It is now read-only.

Node should leave the cluster when Constructr is terminated (closes #119) #120

Merged

Conversation

berardino
Copy link
Contributor

No description provided.

case Terminated(`machine`) => {
val cluster = Cluster(context.system)
val self = cluster.selfAddress
if (cluster.state.members.exists(member => member.address == self && member.status == Up)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this check is needed, Akka Cluster should take care itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is needed to terminate the actor system in case the node is not member of the cluster yet.
For instance a system initialization problem that prevent the node from joining the cluster. In this case a leave won't do anything and the system won't be terminated.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@berardino berardino force-pushed the 119-leave-cluster-when-terminated branch from 0cae548 to 8af503e Compare August 24, 2016 20:47
@hseeberger
Copy link
Owner

Hmm ... Travis failing ... I'll rerun it.

@hseeberger hseeberger merged commit 5d1470d into hseeberger:master Aug 25, 2016
@hseeberger
Copy link
Owner

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants