Skip to content

Preserve partial downloads on network failure - #4695

Merged
rami3l merged 4 commits into
rust-lang:mainfrom
FranciscoTGouveia:download-recover
Feb 11, 2026
Merged

Preserve partial downloads on network failure#4695
rami3l merged 4 commits into
rust-lang:mainfrom
FranciscoTGouveia:download-recover

Conversation

@FranciscoTGouveia

Copy link
Copy Markdown
Contributor

Closes#4448.

If resume_from_partial is set to true, it short-circuits, ensuring the remove_file(path) is not called.

@rami3lrami3l self-assigned this Jan 31, 2026
@rami3l

Copy link
Copy Markdown
Member

@FranciscoTGouveia Looks easy enough! I'll give it a test drive when I'm back with my machine :)

@rami3lrami3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Many thanks for investigating into this!

OTOH I do think we need to be more careful about filtering the right kind of error since we do want to redownload if the cache is proven to be corrupted for example 🙏

Comment threadsrc/download/mod.rs Outdated
@djc
djc marked this pull request as draft February 6, 2026 12:57
Comment threadsrc/download/mod.rs
Comment threadsrc/download/mod.rs Outdated

@rami3lrami3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM modulo a minor wording change and some nits, nice work :)

When you are done, just squash the first 3 commits into one (they include some back-and-forth) and we are good to go.

Comment threadsrc/errors.rs Outdated
Comment threadsrc/download/tests.rs Outdated
@FranciscoTGouveia
FranciscoTGouveia marked this pull request as ready for review February 10, 2026 21:44
djc
djc approved these changes Feb 11, 2026
Comment threadsrc/download/mod.rs

@rami3lrami3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work :)

@rami3l
rami3l added this pull request to the merge queueFeb 11, 2026
Merged via the queue into rust-lang:main with commit 589d633Feb 11, 2026
29 checks passed
Sign up for freeto 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.

Resume partial download on network failure

3 participants

@FranciscoTGouveia@rami3l@djc