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
{{ message }}
Repository navigation
Commit ddebfd6
Browse filesBrowse the repository at this point in the historyBrowse files
A code backfill that could not write part of the index exits non-zero and names what is missing (#1715)
* A code backfill that could not write part of the index exits non-zero and names what is missing
The backfill buffers a round's rows and sends one INSERT per table when a later
read or write of the round needs them written. An INSERT that failed there, such
as one past the write timeout, dropped its rows and those of every table queued
behind it, and raised in whichever file's ingest had started the write. That
file counted as one error, inside the 1% of files a run of 100 or more may fail
and still exit 0, or a stage inside the ingest logged the exception and no file
counted at all. The rows dropped belong to any file of the round.
The round counts the rows a failed write did not send, by table. The counts
ride the batch counters, so a `--workers` process reports them, and the index
phase exits 1 with the pass, the tables, the row counts and the command to run
again on stderr. The watermark is written as it is for file errors, an edge
pass with a failed write stays owed, and the cursor stays before the first batch
with a failed write so that a run stopped after it resumes there.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
* A backfill write that fails as a round ends is counted and reported with the rest
The write that ends a round is sent by the round, in no file's ingest, so its
failure left the batch as an exception: the command ended with a traceback, or
the parent's "backfill worker N exited" under `--workers`, with no row report,
no re-run line and no watermark, and the counts of earlier failed writes in the
run were not printed. The last file's `code_files` row is always in that write.
The batch sends it itself, prints the failure and keeps the round's count, so
the run finishes and exits 1 with the report.
An oversize file's record that could not be written is one file error again.
That record is written on its own, not through the round's buffer, and what
fails there can be a read.
The count for the exit code is taken on its own line before the report is
printed, and both passes' rows are read by pass before the edge pass's join
the run's counters. A test drives `_Run.batch` and `_Run.edge_batch` with a
store whose `code_edges` INSERT fails once, in a file's ingest and as a round
ends.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
* A failed backfill write stops the run at its batch, and the next run resumes there
A write outage that lasts used to be walked through: the failed write as a
round ended was caught, the batch went on, and with inserts failing and reads
working the run ingested every remaining file and then the whole edge pass.
Under --embed each of those files' new chunks is embedded before the buffered
insert that then drops them, and the cursor did not move, so the re-run paid
for them again. If ClickHouse was still unreachable at the end, the git_head
write raised and the run ended in a traceback with no report.
A batch a failed write left rows out of now stops the run the way a held
batch does, in either pass: the batch ends with the round the write belongs
to, `_Run.batch` and `_Run.edge_batch` return why, and the paths that stop a
held run (no further batch in this process or handed to a worker, the cursor
kept, no watermark, exit 1) apply. The report is printed, the edge pass stays
owed, and the next run resumes at that batch or at the pass.
With that, the rows are counted into the batch's counters as each round ends,
however it ends, so a batch held after a failed write still reports them; the
run's `loom.worker_status` row counts the rows left out as failures, so it no
longer says `ok` beside exit 1; and a run that reaches its end has no
`unwritten:<table>` counter, so the span attributes and the exit-code
allowance are as on main.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
---------
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
0 commit comments