Repository navigation
fix(backups): one try a request on S3 for the upload, fetch and check (#177) - #368
Merged
earthlingdavey merged 1 commit intoOct 29, 2026
Merged
Conversation
…smallhoursorg#177) A storage that takes requests and never answers held a backup 100 minutes at the opening and 106 mid-upload [M92]: restic's stuck-request watchdog ends each try at five minutes, minio-go makes ten, and restic's own retries go once more. `-o s3.retries=1` (oneTry) leaves restic's quarter of an hour of retries, each printed, as all there is. Measured through the units, the product binaries in an e2e box [M93]: - the upload's opening: 6003 s before, 904 s after, blog failed and named, the others not attempted; - mid-upload: 6343 s before; 1245, 2109 and 2146 s after; - mid-fetch: 2108 s (exit 1) and 3040 s (exit 130, restic's lock monitor) after, each app's own; - the check's opening: 904 s, the drill exit 1, unreachable; - a 10-minute blackhole, then normal, and 60 s of 500s on every request: exit 0, both apps ok, as before. The listings keep minio-go's ten: one 500 retried by restic is a line on stderr, and a listing beside one is not believed [M92]. Every other backend ignores the option. Triaged, and accepted, in the README's residuals: a storage that answers a byte at a time (narrowed, still smallhoursorg#177's); the drill's check mid-read, which takes no lock and so holds a quarter of an hour for each five packs left [M94]; a drill's fetch followed by the next app's listing clock; a region error under one try where no region is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The change affects every off-site upload, fetch, and integrity check, requiring maintainer confirmation of provider-specific fault measurements and acceptance of documented long-running-check and region-error residuals.
No open issues 🎉
What changed in this PR
This PR advances #177 by reducing S3 request retries for backup uploads, restores, and repository checks, shortening stalls when storage stops responding. Listings retain their existing retries to avoid stderr output that would invalidate their results.
Changes:
- Adds shared
-o s3.retries=1arguments to upload, fetch, and check commands. - Adds regression coverage for which restic units receive the option.
- Documents measured failure timings and accepted remaining limitations.
| File | Description |
|---|---|
| docs/design/backups/plan.md | Records fault measurements and the revised retry decision. |
| docs/backups.md | Updates operator guidance on storage stalls and remaining limits. |
| backups/README.md | Documents retry behavior and accepted residual failures. |
| backups/engine/restore.go | Applies one-attempt S3 requests to fetches and updates explanatory comments. |
| backups/engine/engine.go | Defines shared retry arguments and applies them to uploads. |
| backups/engine/engine_test.go | Verifies only upload, fetch, and check units receive the option. |
| backups/engine/check.go | Applies the retry option to repository checks. |
| backups/engine/check_test.go | Updates the expected repository-check command. |
Review effort: Balanced
earthlingdavey
added a commit
that referenced
this pull request
Oct 29, 2026
…#369) #368 bounded a storage that never answers. What is left, a storage that answers a byte at a time and the drill's check blackholed mid-read, scored 12 under the triage rule, so it is accepted and #177 is closed with its scores. The rows and the guide that called it #177's question still now say so; the watchdog and the dead man's switch are features. Co-authored-by: refmerge <refmerge@localhost> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #177.
A storage that accepts requests and never answers held a backup for 100 minutes at the opening and 106 mid-upload [M92]. restic's stuck-request watchdog ends each try at five minutes, minio-go makes ten tries, and restic's own retry layer always goes round once more. The upload, the fetch and the drill's check now run with
-o s3.retries=1(oneTryinbackups/engine/engine.go). That leaves restic's own quarter of an hour of retries, each one printed to the journal, as all there is.The listings keep minio-go's ten tries. With one try, a single 500 on a listing is retried by restic rather than minio-go, which puts a line on stderr, and hotserve does not believe a listing with anything beside it (
besides) [M92]. Every other backend (local,rest:,sftp:) ignores the option.Measured
Through the real units, with the product binaries (before:
58c4aab; after: this branch) in an e2e box. The fault proxy runs in the box's network namespace [M93]:failedand named, the othersnot attemptedunreachableM94, bare restic: the check blackholed mid-read gives up five packs every quarter of an hour, and has no lock monitor to end it: 2711 s for 14 packs, exit 1.
Triage
Scored by
.claude/skills/triage/SKILL.md. The bar, for reviewers who cannot read the skill: every failure is scored severity × occurrence × detection, each on 1–5.backups/README.md's "Accepted residuals".Please flag only findings that clear that bar, and score them.
AccessDenied)KillSignal=SIGQUITNote for the merger: this change is wide. It changes how every upload, fetch and check talks to off-site storage. It is not one-way: reverting this commit restores minio-go's ten tries.
Tests
TestOnlyTheUnclockedUnitsMakeOneTry: the upload, fetch and check each carry-o s3.retries=1exactly once, and no other restic unit carries it. It fails whenoneTryis emptied, and when a listing is given it.make test,make vetandmake lintpass on the rebased branch.make e2e-backuppasses, all suites.🤖 Generated with Claude Code