Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliably start Notifications supervisor on global name clash #165

Merged
merged 4 commits into from
May 3, 2019

Conversation

slashdotdash
Copy link
Member

The Notifications.Supervisor process is started with a globally registered process name to ensure only one instance runs within a cluster of nodes when run using distributed Erlang. Only a single database listener process is needed to run because it broadcasts events to processes running on all connected nodes.

However, when the same named global processes exist when two nodes are connected one process will be killed. If this occurs during proess start then the error returned from start_link is {:error, :killed}. This error is not being handled, causing the entire event store application to crash.

The pull request ensures than when an {:error, :killed} value is returned the supervisor process is started again, locating the existing named process and linking to it.

Fixes #164.

@slashdotdash slashdotdash merged commit f06013d into master May 3, 2019
@slashdotdash slashdotdash deleted the bug/notifications_supervisor branch May 3, 2019 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starting Notifications.Supervisor fails with {:error, :killed}
2 participants