Skip to content

check: fix error reporting on download retry#5495

Merged
MichaelEischer merged 2 commits intorestic:masterfrom
MichaelEischer:fix-check-retries
Sep 15, 2025
Merged

check: fix error reporting on download retry#5495
MichaelEischer merged 2 commits intorestic:masterfrom
MichaelEischer:fix-check-retries

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer commented Sep 7, 2025

What does this PR change? What problem does it solve?

Reset all blob decoding errors in a pack file when retrying the download. We're only interested in the result for the last attempt as otherwise the overall pack file hash check and the blob errors are inconsistent with each other.

For a perfect backend, this shouldn't make any difference as the backend would only ever return incomplete data but never garbage data. Hence the checks inside the Load(...) call wouldn't report errors. But if the first incomplete attempt returned garbage data but the second attempt was successful, then check would report an error for individual blobs, but not the overall pack file. This is highly confusing.

Was the change previously discussed in an issue or on the forum?

Partially addresses #5467

Checklist

  • I have added tests for all code changes.
  • [ ] I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I'm done! This pull request is ready for review.

Copy link
Copy Markdown
Member Author

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MichaelEischer MichaelEischer merged commit 81fe559 into restic:master Sep 15, 2025
11 checks passed
@MichaelEischer MichaelEischer deleted the fix-check-retries branch September 15, 2025 17:31
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.

1 participant