membrane_core icon indicating copy to clipboard operation
membrane_core copied to clipboard

Implement different supervision policies for children that are being removed

Open daniel-jodlos opened this issue 4 years ago • 3 comments

After remove_child action, the child remains fully supervised util it its process closes. Combined with crash groups, it may lead to unintuitive behavior in which a child triggers the crash group after calling remove_child: <child>.

One solution would be to introduce different policies for dealing with terminating children:

  • orphan the child, ignoring how it terminates
  • don't trigger the crash group, but still inform about the child crashing during termination (possibly it should be default?)
  • Current, strict supervision

The behavior could be selected individually for each crash group in the spec

daniel-jodlos avatar Nov 09 '21 11:11 daniel-jodlos

The behaviour could also be selected when removing a child

mat-hek avatar Nov 09 '21 12:11 mat-hek

Selecting the behavior when removing a child has an API problem. Because child id can be anything, we cannot use a tuple as action argument, this would make the call ambiguous.

I think we could define different actions for different policies (eg. remove_and_orphan_child, remove_child, supervised_remove_child) if we want to maintain compatibility with the current API.

daniel-jodlos avatar Nov 12 '21 09:11 daniel-jodlos

Yup, orphan_child was what I thought of

mat-hek avatar Nov 15 '21 10:11 mat-hek

Since we do not have a real live use for this issue we are not going to work on it as of now.

darthez avatar Mar 05 '24 15:03 darthez