Skip to content

fix(preheat): reset the retry budget after a run that fetched data - #134

Merged
dongzhenyangofficial-ctrl merged 1 commit into
dingodb:mainfrom
mangoknight:fix/preheat-retry-reset-on-progress
Oct 19, 2026
Merged

dongzhenyangofficial-ctrl merged 1 commit into
dingodb:mainfrom
mangoknight:fix/preheat-retry-reset-on-progress

Conversation

@mangoknight

Copy link
Copy Markdown
Collaborator

Problem

The preheat retry budget (8 attempts, #130) counted every failure over a job's whole lifetime. A multi-day preheat hits unrelated transient upstream errors hours apart. Each one is recovered by a retry, but together they use up the budget, so the next transient error fails the job even though it has been making steady progress.

Fix

Track bytes received from upstream (fetchedBytes, never reset). If a failed run fetched at least PreheatRetryResetBytes (1 GiB), the count starts over. The budget now bounds consecutive failures without progress. Non-retryable errors and job cancellation behave as before.

Tests

  • TestPreheatRetryBudgetResetsAfterProgress: five failing runs that each fetched data keep being retried, and two retries without progress follow before giving up. The old logic gives up after 3 attempts.
  • Existing TestPreheatRetriesTransientFailures and TestPreheatRetryGivesUp still pass; go test ./... passes (except a known macOS-only case in pkg/hfprojection).

🤖 Generated with Claude Code

The 8-attempt budget counted every failure over a job's lifetime. A
multi-day preheat meets many unrelated upstream hiccups hours apart; each
was recovered by a retry, yet together they exhausted the budget, so the
next transient error would fail the job despite steady progress.

Track bytes received from upstream; a failed run that fetched at least
PreheatRetryResetBytes (1 GiB) restarts the count, so the budget bounds
consecutive failures without progress.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dongzhenyangofficial-ctrl
dongzhenyangofficial-ctrl added this pull request to the merge queue Oct 19, 2026
Merged via the queue into dingodb:main with commit 193209e Oct 19, 2026
1 check 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