Re: Supervisor shutdown reason when reaching max restarts

Fredrik <[email protected]>
Newsgroups gmane.comp.lang.erlang.patches
Message-ID <[email protected]>
On 07/04/2013 04:44 PM, Tobias Schlager wrote:
> 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.git supervisor_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
> [email protected]
> http://erlang.org/mailman/listinfo/erlang-patches
Hello Tobias,
I've fetched your patch and assigned it to be reviewed by responsible team.
Thanks,

-- 

BR Fredrik Gustafsson
Erlang OTP Team

_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.