Terminator calls `system_shutdown` immediately when parent goes down, ignoring `shutdown_timeout` for placed children
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- elixir, kubernetes
- Área
- backend, distributed-systems
Línea de trabajo
Start in lib/flame/terminator.ex at the system_stop/2 call around line 201, then compare it with terminate/2 and the place_child documentation for link: false and shutdown_timeout. Trace the shutdown sequence; done means the intended timeout semantics are resolved and the relevant implementation or documentation is updated with regression coverage.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
We're using FLAME to persist WebRTC call-routing processes across deployments. The idea is to run packet-routing processes on FLAME runner nodes via place_child with link: false, so that when the parent node restarts during a deploy, the runner and its placed children survive until the new parent can reconnect.
The place_child docs say:
:link– Whether the caller should be linked to the remote child process to prevent long-running orphaned resources. Defaults totrue. Set tofalseto support
long-running work that you want to complete within the:shutdown_timeoutof the remote runner, even when the parent process or node is terminated.
However, when the parent node goes down, FLAME.Terminator calls system_stop/2 immediately. It does not wait for shutdown_timeout before initiating shutdown: https://github.com/phoenixframework/flame/blob/27b94dafd874cd9747007205d25ee2d81349de07/lib/flame/terminator.ex#L201
The shutdown_timeout seems to only apply in terminate/2 to drain in-flight RPC calls-- it doesn't delay the system_shutdown() call itself. So placed children with link: false get no grace period to finish their work; the runner starts terminating immediately.
Is this the intended behavior? We read the link: false docs as implying placed children would get up to shutdown_timeout to complete their work when the parent goes away.
Should the Terminator delay calling system_stop() to honor that, or is there a different mechanism we should be using for this use case?
Environment
- FLAME: v0.5.3
- Backend: flame_k8s_backend v0.5.7
- Lenguaje dominante
- Elixir
- Estrellas
- 1.2k
- Forks
- 68
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de phoenixframework/flame
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
phoenixframework/flame#84 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
phoenixframework/flame#75 · 2 comentarios ·
-
Clean up code_sync tmp files on terminator shutdownQuizá libre de nuevo @chrismccord la tomó hace 684 días y no hay ningún pull request abierto. Abierto
phoenixframework/flame#70 · 1 asignado ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
phoenixframework/flame#66 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
phoenixframework/flame#64 ·
Todos los issues de phoenixframework/flame
Issues similares
-
github_actions
Dificultad 1/5 Menos de una hora Aptitud para principiantes 94/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
team-alembic/clarity#146 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
etalab/schema-irve#83 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ash-project/ash_ai#249 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
marketing v9
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
revelrylabs/harmonium#715 ·
Los mantenedores suelen responder en 1 día