A commit's dependents step is lost when the worker dies before it or the step fails
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with pass_commit.py around _ingest_commit, _ingest_commit_files, and _resolve_dependents, then trace how pass_stream.py advances git_head and saves commit_slice. Read the related issue #1680 and PR #1967 for the existing dependents_pending approach. Reproduce the worker-death, failed-step, and multi-round cases described here; done means dependents are resolved after recovery and a failed step does not let the watermark advance past unfinished work.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Company
Independent
Component
Code index
Describe what's wrong
A commit's ingest (pass_commit._ingest_commit) writes the commit's files in rounds, then runs the dependents step (_resolve_dependents: closure repair of declined sites and the edges-only re-extraction of the untouched callers) over a delta built from the files' FileIngestStats, and only then does CommitStream.step move the git_head watermark (pass_stream.py). The delta lives only in memory, and the step can be lost in two ways.
- A worker that dies between the writes and the step. The watermark has not moved, so the next pass reruns the commit. But the commit's rows are already written, so the rerun's
ingest_filecompares the file against itself and reports no added or removed names and no retired ids. The rerun's delta is empty,_resolve_dependentsreturns without running, and the watermark moves. A caller in an untouched file whose declined site names a definition the commit added stays declined, and an edge into a definition the commit removed stays live, until a later commit touches the calling file. A commit ingested in more than one round has a second form of it:_ingest_commit_filessaves the slice cursor (commit_slice) after each round is flushed, before the step, so a kill at the step resumes past the files the cursor counts, and the step never reads their change. Withcode_ingest_round_files = 1and a commit touching two files, the cursor read<first>..<head>:1at the step, and the resumed pass ingested only the second file and bound nothing. - A step that fails.
_resolve_dependentsrecords the error and returns ("never fatal to the commit"),_ingest_commitreturns as if the commit landed whole, and the watermark moves. Nothing runs the step again.
Neither path leaves anything stale for the reconcile to find: the touched files' blobs match their rows, and the callers' blobs did not move.
Does it reproduce on the latest release or main?
Yes, on main at 5bcab2dfa, with an integration probe against a private ClickHouse, a real git repository and the real _ingest_commit, ingest_file and dependents step.
How to reproduce
- Index
src/lib.cpp(namespace DB { int other(); }) andsrc/caller0.cpp(int run0() { return helper(); }) at a first commit, so the caller'shelpersite is declinedunresolved. - Commit
src/lib.cppwithint helper()added;src/caller0.cppis untouched. - Control: one
_ingest_commitof that commit binds the caller's site (closure repair resolves 1, one edge intoDB::helper, no declined site). - Kill: in a fresh namespace, run
_ingest_commitwith_resolve_dependentsraising aBaseException(a kill no handler catches).DB::helperis durable and the caller's site is still declined. Run_ingest_commitfor the same commit again, as the next pass does: it returnsNone(the commit landed whole, so the watermark moves), closure repair resolves 0, and the caller keeps its declinedhelpersite with no edge. - Failed step: in a fresh namespace, run
_ingest_commitwithdependents.run_for_commitraising. It returnsNonewithdependents: RuntimeErrorin the errors, and the caller keeps its declined site with no edge. - Rounds: in a fresh namespace, set
code_ingest_round_files = 1and make the commit touchsrc/lib.cppand a second file,src/zz.cpp. DriveCommitStream.stepwith_resolve_dependentsraising aBaseException. At the stepcommit_slicealready reads<first>..<head>:1. Step again, as the next pass does: it plans 1 file (it skipssrc/lib.cpp), closure repair resolves 0, the caller keeps its declined site, andgit_headmoves.
Expected behavior
A commit's dependents step runs once its files are written, whether the worker that wrote them survives or the first attempt fails: the callers end up bound to what the commit added and released from what it removed, as they are after a clean pass.
Environment
main, code index fast tier, commit walk.
Related issues and pull requests
Related: https://github.com/ClickHouse/loom/issues/1680, https://github.com/ClickHouse/loom/pull/1967
How this was found
An AI tool helped find it, and I reproduced it myself
Additional context
#1967 closes the same window for the reconcile and for loom code reconcile --heal: before each writer it records the paths' symbols in the dependents_pending row, and the step takes its delta from the rows against that record and clears it after it runs. The commit path differs in shape, so it was left out of that PR: a commit's delta spans rounds, slices and passes, its overflow is queued per commit, and a record would have to move with the slice cursor and the watermark. Recording each round's paths before it writes, and running the step from the record, is one shape; the per-round save of the slice cursor is what moves first today, so the record has to outlive it as well as the watermark. Keeping the record when the step fails, rather than moving the watermark past it, closes the second gap.
Redaction
- I removed tokens, keys, passwords and personal or customer data from everything above.
- Lenguaje dominante
- Python
- Estrellas
- 221
- Forks
- 35
- Merge medio
- 14 h 21 min
- PR fusionados (30 d)
- 873
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 ClickHouse/loom
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
ClickHouse/loom#2014 ·
Los mantenedores suelen responder en 1 día
-
Options of loom period-digest, reextract, reconcile-status and demote-activity-narration print no help textPosiblemente ocupada @VanshajPoonia la tomó hoy. Abiertobug good first issue help wanted up-for-grabs
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ClickHouse/loom#1988 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
A compiler-tier checkout fetch from a shallow mirror never records its headPosiblemente ocupada @KaloyanNaumov la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
ClickHouse/loom#2016 ·
Los mantenedores suelen responder en 1 día
-
Delta workers fetch the compiler-tier checkout under a hard-coded 600 s limitPosiblemente ocupada @KaloyanNaumov la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
ClickHouse/loom#2012 ·
Los mantenedores suelen responder en 1 día
-
loom participant retire cannot retire an orphaned participant after container replacement or host rebootPosiblemente ocupada @l0K1ngg la tomó hoy. Abiertobug help wanted up-for-grabs
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
ClickHouse/loom#2007 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de ClickHouse/loom
Issues similares
-
Ubuntu for Debian DevelopersAbiertoDMB documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ubuntu/ubuntu-project-docs#921 ·
Los mantenedores suelen responder en 1 día
-
⏳ Pending feedback 🐛 Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
jumpserver/jumpserver#18282 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
future-agi/future-agi#5274 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
GenericMappingTools/pygmt#5014 · 1 comentario ·
Los mantenedores suelen responder en 1 día