You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case a child needs to be gracefully restarted (terminated and spawned with the same name once again) it is difficult to figure out when it is OK to return spec action. In case that action is returned prematurely, when the child is still terminating, it will cause crash due to duplicated children error.
The following solutions could help solve this problem:
adding handle_child_terminated callback in pipelines and bins so that user can return spec action in response to child termination
adding new child spec to the awaiting_specs and executing spec action from that awaiting_specs when children which blocked execution of given spec terminates (possibly we should also think about some configurable timeout which user could use to specify how long spec can wait in awaiting_specs)
It's important not to have two children with the same name running concurrently (we cannot spawn new child when the old one is still terminating) as it might cause some trouble with shared resources access etc.
Furthermore, we need to think whether or not we should preserve the guarantee we currently have, that in the first callback invoked after the callback where spec is returned, the newly spawned child is already available in context and can be refered, for instance, with notify_child action.
The text was updated successfully, but these errors were encountered:
In case a child needs to be gracefully restarted (terminated and spawned with the same name once again) it is difficult to figure out when it is OK to return
spec
action. In case that action is returned prematurely, when the child is still terminating, it will cause crash due toduplicated
children error.The following solutions could help solve this problem:
handle_child_terminated
callback in pipelines and bins so that user can returnspec
action in response to child terminationawaiting_specs
and executing spec action from thatawaiting_specs
when children which blocked execution of given spec terminates (possibly we should also think about some configurable timeout which user could use to specify how long spec can wait inawaiting_specs
)It's important not to have two children with the same name running concurrently (we cannot spawn new child when the old one is still terminating) as it might cause some trouble with shared resources access etc.
Furthermore, we need to think whether or not we should preserve the guarantee we currently have, that in the first callback invoked after the callback where
spec
is returned, the newly spawned child is already available in context and can be refered, for instance, withnotify_child
action.The text was updated successfully, but these errors were encountered: