MergePipeline deadlocks on graceful shutdown if a merge actor fails before or during shutdown
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Read quickwit/quickwit-indexing/src/actors/merge_pipeline.rs, focusing on perform_health_check and the handlers for FinishPendingMergesAndShutdownPipeline and Spawn. Trace the shutdown and retry paths described in the issue, then inspect nearby tests for merge pipeline supervision. Done means each listed interleaving exits the actor cleanly while the shutdown request still receives a successful reply.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
MergePipeline can hang indefinitely after receiving FinishPendingMergesAndShutdownPipeline when a child actor fails (e.g., transient object-storage or metastore error) either right before or during graceful shutdown.
Root Cause
In quickwit/quickwit-indexing/src/actors/merge_pipeline.rs:
perform_health_check(lines 404–428):- When
self.handles_optisNone, it returnsOk(())even ifself.shutdown_initiatedistrue. - When
Health::FailureOrUnhealthyoccurs, it callsself.terminate().await(settingself.handles_opt = None) and schedulesSpawn { retry_count: 0 }, even ifself.shutdown_initiatedistrue.
- When
Handler<FinishPendingMergesAndShutdownPipeline>(lines 480–515):- Sets
self.shutdown_initiated = true. Ifself.handles_optis currentlyNone(e.g., the pipeline just terminated after a failure and is waiting forSpawnbackoff, or initial spawn failed and is retrying), it takes theelsebranch and returnsOk(()).
- Sets
Handler<Spawn>(lines 519–529):- Sees
if self.shutdown_initiated { return Ok(()); }instead of exiting the actor.
- Sees
Once self.shutdown_initiated == true and self.handles_opt.is_none(), SuperviseLoop continues ticking every second forever and MergePipeline never terminates (blocking graceful shutdown / decommission until an external timeout kills it).
Triggering Interleavings
- Failure during shutdown:
FinishPendingMergesAndShutdownPipelinesetsshutdown_initiated = true-> a merge actor (e.g.,MergeSplitDownloader,Uploader,Publisher) fails on a transient storage/metastore error ->perform_health_checkterminates actors (handles_opt = None) and schedulesSpawn->SpawnreturnsOk(())->SuperviseLooploops forever. - Shutdown during failure backoff: A merge actor fails ->
perform_health_checkcallsself.terminate().await(handles_opt = None) and schedulesSpawnafterHEARTBEAT->FinishPendingMergesAndShutdownPipelinearrives beforeSpawn, seeshandles_opt = None, returnsOk(())->SpawnreturnsOk(())->SuperviseLooploops forever. - Shutdown during initial spawn retry:
spawn_pipeline()fails on a transient metastore error (handles_opt = None) and schedules retrySpawn->FinishPendingMergesAndShutdownPipelinearrives ->SuperviseLooploops forever.
Suggested Fix
In quickwit/quickwit-indexing/src/actors/merge_pipeline.rs:
- In
perform_health_check:- If
self.handles_optisNoneandself.shutdown_initiatedistrue, returnErr(ActorExitStatus::Success). - On
Health::FailureOrUnhealthy, afterself.terminate().await, ifself.shutdown_initiatedistrue, returnErr(ActorExitStatus::Success)instead of schedulingSpawn.
- If
- In
Handler<Spawn>:- If
self.shutdown_initiatedistrue, returnErr(ActorExitStatus::Success).
- If
(Keeping Handler<FinishPendingMergesAndShutdownPipeline> returning Ok(()) preserves clean ask(FinishPendingMergesAndShutdownPipeline) replies for callers, while the next SuperviseLoop / Spawn tick exits cleanly with ActorExitStatus::Success.)
- Lenguaje dominante
- Rust
- Estrellas
- 11.8k
- Forks
- 628
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 50
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 quickwit-oss/quickwit
-
area:otel documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
quickwit-oss/quickwit#6686 ·
Los mantenedores suelen responder en 1 día
-
Add some examples of requests in the REST API reference docsPosiblemente ocupada @Cunninger la tomó hace 88 días. Abiertoenhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quickwit-oss/quickwit#4266 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
quickwit-oss/quickwit#3872 ·
Los mantenedores suelen responder en 1 día
-
Update docs on range queriesAbiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
quickwit-oss/quickwit#3666 ·
Los mantenedores suelen responder en 1 día
-
implement retry for ListTermsAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
quickwit-oss/quickwit#2769 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quickwit-oss/quickwit
Issues similares
-
p2 ready-mac
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quickwit-oss/tantivy#3299 ·
Los mantenedores suelen responder en 1 día
-
`stream enable` fails with "already enabled" on every fresh session since streaming became always-onAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
vercel-labs/agent-browser#2797 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
witchesofthehill/manabrew#1309 ·
Los mantenedores suelen responder en 1 día
-
bug help wanted ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
userFRM/egui-charts#4494 ·
Los mantenedores suelen responder en 1 día