Skip to content

feat(preheat): retry a failed manifest with backoff - #130

Merged
mangoknight merged 2 commits into
dingodb:mainfrom
mangoknight:feat/preheat-auto-retry
Oct 13, 2026
Merged

mangoknight merged 2 commits into
dingodb:mainfrom
mangoknight:feat/preheat-auto-retry

Conversation

@mangoknight

@mangoknight mangoknight commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A preheat can run for hours, and any single file error failed the whole job, requiring a manual resume even for transient upstream errors.

Fix

Re-run a failed manifest with backoff 30s, 1m, 2m, 5m, then 10m (8 attempts, ~48 min). Completed files are skipped and partial files resume from the cached offset. No retry when the job context is done (stop/cancel/shutdown) or on 401/403/404. Progress restarts per attempt and the speed sampler guards against counter rollback.

Tests

TestPreheatRetriesTransientFailures, TestPreheatRetryGivesUp. go test -race ./internal/service/task/ passes.

🤖 Generated with Claude Code

Preheat jobs run for hours through shared upstream exits, and any one
file error failed the whole job. On 2026-10-13 at bj-11 a ~13s burst of
dropped connections (unexpected EOF on every stream) failed
CASIA-LM/ChineseWebText2.0 at 87% of 1.6 TiB, and a single paths-info
timeout failed uonlp/CulturaX; both sat failed for hours until resumed
by hand, and both only needed another pass.

Rerun the manifest after 30s, 1m, 2m, 5m, then 10m (8 retries, ~48 min).
A rerun skips completed files and resumes partial ones from their cached
offset. No retry when the job was stopped, canceled or shut down, or when
the upstream answered 401/403/404. The progress counter restarts with
each pass, and the speed sampler no longer underflows when it does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cooocy
cooocy self-requested a review October 13, 2026 15:53
TestModelScopeFailedTaskRetriesPinnedCache waits for the job to fail and
then resumes it by hand; with auto-retry the job sat in its first 30s
backoff instead. Export PreheatRetryBackoff (empty disables retries) and
clear it in that test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mangoknight
mangoknight added this pull request to the merge queue Oct 13, 2026
Merged via the queue into dingodb:main with commit 5671348 Oct 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants