ingest v2: WAL truncation blocks persist/init_shards, causing ingest timeouts under load
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #6599 de @aanufriev-celonis — cerrado sin fusionar
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
- rust
Línea de trabajo
Comienza en EventSubscriber::handle_event y sigue el recorrido de lock_fully, persist e init_shards; después, reproduce la contención durante una ingesta sostenida con actualizaciones frecuentes de las posiciones de los shards. La corrección estará terminada cuando la limpieza del WAL ceda el bloqueo del ingester entre pequeñas unidades de trabajo y persist/init_shards ya no sufran timeouts durante la truncación; verifícalo con las pruebas pertinentes de ingesta y concurrencia.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
In ingest v2, the ingester's shard-positions gossip handler holds the ingester's global lock across an entire WAL-truncation pass, which blocks ingestion on that node while the pass runs.
EventSubscriber<ShardPositionsUpdate>::handle_event acquires the full ingester lock once (lock_fully) and holds it while it truncates/deletes every shard in the update.
persist and init_shards take that same lock. So the truncation pass is effectively a stop-the-world for that ingester, each truncate/delete performs WAL disk I/O, so on a node with many shards and/or a WAL on slower storage it can hold the lock for tens of seconds.
During that window:
-
incoming
persistrequests queue behind the lock and (our case) exceed client ingest timeouts; -
a concurrent
init_shards, auto-scale-up triggered by the same traffic surge, also blocks and times out, so the source cannot add capacity exactly when it needs to.
Steps to reproduce (if applicable)
This is a contention/timing issue, so it reproduces under load. Conditions that trigger it:
- Run an ingester (ingest v2) that leads many shards, ideally with the WAL on slower storage.
- Drive a sustained ingestion surge into a source so the control plane attempts to scale the source up while shard positions are actively gossiped (frequent
ShardPositionsUpdatetruncations). - Observe on that ingester: WAL lock-acquire warnings,
ShardPositionsUpdatehandler-budget warnings,failed to init shards ... request timed out.
Expected behavior
Background WAL cleanup driven by gossiped shard positions must not block ingestion for the duration of the whole pass. Ingest latency (and init_shards) should not spike to seconds/tens-of-seconds (up to 50 in our case) because a truncation pass is in progress. The cleanup should yield the ingester lock frequently enough that queued persist/init_shards calls can interleave, performing small units of work rather than the entire update.
Configuration:
quickwit:d33dd237f8250899c223bb2cd7997f005ed616fe
- 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