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

Adding handling if the actor fails during pre_start that it doesn't poison the named and pid registries. #243

Merged
merged 2 commits into from
May 24, 2024

Conversation

slawlor
Copy link
Owner

@slawlor slawlor commented May 24, 2024

Handling actor startup errors in pre_start results in a SpawnErr however it wasn't being handled putting the actor into a Stopped state (which it should have), since that's where the actor registries are cleaned up such as the named and pg registries. This would result in dangling references in those registries.

This PR specifically captures spawn failures and sets the actor to stopped to call the necessary de-registration hooks.

Resolves #240

slawlor added 2 commits May 23, 2024 21:18
…tations.

This allows people implementing their own traits for routing and queueing to have access to the necessary worker properties to route jobs, as well as necessary job properties.
@slawlor slawlor marked this pull request as ready for review May 24, 2024 01:38
@slawlor slawlor merged commit 6f04d98 into main May 24, 2024
12 checks passed
@slawlor slawlor deleted the poisoned_named_registry branch May 24, 2024 01:40
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.

SpawnErr when spawning named actor will permanently pollute that name
1 participant