Skip to content

feat(transfer): add redo mechanism for failed checksum verification - #2524

Merged
oferchen merged 1 commit into
masterfrom
feat/redo-mechanism
Feb 27, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/redo-mechanism

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • When the receiver detects a whole-file checksum mismatch during phase 1, the file index is queued for redo instead of aborting the transfer (mirrors upstream receiver.c:970-974)
  • After phase 1 completes, queued files are retransmitted in a phase 2 redo pass with empty basis (whole-file, no delta) — mirroring upstream generator.c:2160-2199
  • If phase 2 verification also fails, the error is logged but transfer continues
  • Adds redo_count field to TransferStats for observability
  • Six new unit tests for the redo mechanism

Test plan

  • cargo nextest run --package transfer --all-features — 995 tests pass
  • cargo check --workspace --all-features — workspace compiles
  • cargo fmt --all -- --check — formatting clean
  • CI: fmt+clippy, nextest, Windows, macOS, Linux musl

@github-actions github-actions Bot added the enhancement New feature or request label Feb 27, 2026
@oferchen
oferchen force-pushed the feat/redo-mechanism branch 2 times, most recently from 2e7bc88 to cd3d8ad Compare February 27, 2026 10:20
Implement upstream rsync's redo/re-transfer mechanism. When the receiver
detects a whole-file checksum mismatch after delta application, the file
is queued for retransmission in phase 2 instead of aborting the entire
transfer. Phase 2 uses empty basis (whole-file transfer) with no delta.
If phase 2 also fails, the error is logged and transfer continues.
@oferchen
oferchen force-pushed the feat/redo-mechanism branch from cd3d8ad to 6f363bb Compare February 27, 2026 10:51
@oferchen
oferchen merged commit 6a3bb1e into master Feb 27, 2026
7 checks passed
@oferchen
oferchen deleted the feat/redo-mechanism branch February 27, 2026 11:17
oferchen added a commit that referenced this pull request May 1, 2026
…2524)

Implement upstream rsync's redo/re-transfer mechanism. When the receiver
detects a whole-file checksum mismatch after delta application, the file
is queued for retransmission in phase 2 instead of aborting the entire
transfer. Phase 2 uses empty basis (whole-file transfer) with no delta.
If phase 2 also fails, the error is logged and transfer continues.
oferchen added a commit that referenced this pull request May 5, 2026
…2524)

Implement upstream rsync's redo/re-transfer mechanism. When the receiver
detects a whole-file checksum mismatch after delta application, the file
is queued for retransmission in phase 2 instead of aborting the entire
transfer. Phase 2 uses empty basis (whole-file transfer) with no delta.
If phase 2 also fails, the error is logged and transfer continues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant