Skip to content

fix(snapshots): handle completed part-file resumes#139

Open
tallyhuhu wants to merge 1 commit into
circlefin:mainfrom
tallyhuhu:fix/arc-snapshots-resume-416
Open

fix(snapshots): handle completed part-file resumes#139
tallyhuhu wants to merge 1 commit into
circlefin:mainfrom
tallyhuhu:fix/arc-snapshots-resume-416

Conversation

@tallyhuhu

Copy link
Copy Markdown

Summary

Handle the resume edge case where an arc-snapshots .part file is already fully downloaded, but the process stopped before it was renamed to the final archive path.

If the next request sends a range starting at the local .part length, servers can reply with 416 Range Not Satisfiable and Content-Range: bytes */N. When N matches the local .part size, treat the part file as complete and continue with the normal rename/extract flow.

Testing

  • cargo fmt -p arc-snapshots --check
  • env NO_PROXY=127.0.0.1,localhost no_proxy=127.0.0.1,localhost cargo test -p arc-snapshots
  • cargo clippy -p arc-snapshots --all-targets -- -D warnings

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