[erlang-patches] Supervisor shutdown reason when reaching max restarts
Siri Hansen
erlangsiri@REDACTED
Fri Aug 23 09:50:08 CEST 2013
Hi Tobias!
Thank you for the patch. We have discussed this on OTP Technical Board, and
have come to the conclusion that some more investigation is needed of the
potential backwards incompatibility. I have written a ticket and the job
will be prioritized into our backlog. Unfortunately we won't make it before
the next release (R16B02).
In order to help us a bit on the way, could you please provide some more
information about your use case? You say that you are monitoring the
supervisor from another process, do you mean other process than the
supervisor's supervisor? If so, could you explain this architecture a bit
more?
Who else will see this exit reason? - application_master? - the parent
supervisors? - other?
Thanks again!
Regards
/siri
2013/7/4 Tobias Schlager <Tobias.Schlager@REDACTED>
> Hi,
>
> this patch changes the behaviour of supervisors to exit with a more
> specific reason when exiting due to a maximum restart limit hit. This is
> especially useful (or even necessary) to distinguish between normal and
> erroneous process terminations when monitoring a supervisor from another
> process.
>
> In the above case a supervisor would now exit with {shutdown,
> {reached_max_restart_intensity, Child}} where Child is whatever is
> available to describe the child, either a child id or in case of a
> simple_one_for_one supervisor the offending child's process id. The patch
> should not affect the OTP restart behaviour (also for cascaded supervisors)
> since a subclass of 'normal' exit reasons is used.
>
> I'm aware that there is some potential backward incompatibility for people
> that do not expect {shutdown, Reason} when monitoring a supervisor.
> However, the feature of exiting normally with {shutdown, Reason} has been
> around for quite a while now and I think this could be a sensible place to
> use it. Let me know what you think.
>
> The patch does include tests and updated documentation.
>
> git fetch https://github.com/schlagert/otp.gitsupervisor_shutdown_reason
>
>
> https://github.com/schlagert/otp/compare/erlang:master...supervisor_shutdown_reason
>
> https://github.com/schlagert/otp/compare/erlang:master...supervisor_shutdown_reason.patch
>
> Regards
> Tobias
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130823/49b4beb5/attachment.htm>
More information about the erlang-patches
mailing list