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

be more specific with die reasons in Supervisor #87

Conversation

tavisrudd
Copy link
Contributor

Several calls to die were using opaque reasons that were unhelpful to
developers during debugging.

Several calls to `die` were using opaque reasons that were unhelpful to
developers during debugging.
@hyperthunk
Copy link
Member

Hmn, I wonder if we should die with an object instead of just a string here. What do you think? Do we ever want to actually catchExit and handle these?

@hyperthunk hyperthunk self-assigned this Apr 20, 2014
@tavisrudd
Copy link
Contributor Author

I'm not sure if it's worth it in this case. One is an internal error. The other is a failure to resolve the return value from the proc passed to toChildStart. That happens inside the starterProcess so there's no chance to catch it.

I'm not sure the die is sufficient here for the same reason. It would kill the starterProcess, which via a monitor eventually propagates out to the unfinished Left case in doRestartChild. The related childSpec would be removed. I think we need to at least log the failure cases in doRestartChild. Should the starterProcess be restarted?

@hyperthunk
Copy link
Member

I think you're right - it's not worth changing.

I think we need to at least log the failure cases in doRestartChild.

Yes I agree with that. Notice or error level I think, probably error IMO.

Should the starterProcess be restarted?

I don't see how that's possible given the nature of the StarterProcess constructor - it just takes a pid and knows nothing about how the restarter process is/was implemented. I think we've simply got to treat that as a failure. Questions arise though:

  • under what circumstances will this remove the child spec?
  • depending on the restart type and policies in place, should this bring down the rest of the tree?
  • do both those aspects actually work in code right now, or have we found a breakage/bug here?

@tavisrudd
Copy link
Contributor Author

I think it should bring down the tree in the same cases where the child would be restarted: all but Temporary. Let's merge these die messages and I'll work on this in a separate PR. It might be best to include some extra error reporting mechanism for this case in your suggestion of spawnChildStarter on PR #77.

tavisrudd added a commit to BirdseyeSoftware/distributed-process-platform that referenced this pull request Apr 25, 2014
@hyperthunk
Copy link
Member

Had to do this by hand due to merge conflicts. Thanks @tavisrudd - I'll get to the rest of the patches now.

@hyperthunk hyperthunk closed this May 9, 2014
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.

2 participants