feature: no partial transfer resume or --partial support #37

Closed
opened 2026-07-20 14:58:20 +02:00 by TapTap · 0 comments
Owner

FastSync has no mechanism to resume partially transferred files if a connection drops mid-transfer:

  1. src/shared/file.c: to_disk() writes to a temp location, but if the transfer is interrupted, the partial file remains at the final path with no recovery.
  2. src/client/client_send.c: There is no --partial or --partial-dir option (unlike rsync).
  3. No temp file naming: Files are written directly to their final path — there is no .part suffix or atomic rename pattern.
  4. No recovery on reconnect: If the client reconnects after a failure, it starts from scratch with no knowledge of what was already transferred.

Rsync provides --partial and --partial-dir to keep partially transferred files and resume them on retry. Without this, large file transfers over unreliable connections are fragile.

Suggested Fix:

  1. Write files to a .part temp name first, then atomically rename on completion
  2. Store transfer state to allow resuming
  3. Add --partial and --partial-dir CLI options

Severity: medium

FastSync has no mechanism to resume partially transferred files if a connection drops mid-transfer: 1. **`src/shared/file.c`**: `to_disk()` writes to a temp location, but if the transfer is interrupted, the partial file remains at the final path with no recovery. 2. **`src/client/client_send.c`**: There is no `--partial` or `--partial-dir` option (unlike rsync). 3. **No temp file naming**: Files are written directly to their final path — there is no `.part` suffix or atomic rename pattern. 4. **No recovery on reconnect**: If the client reconnects after a failure, it starts from scratch with no knowledge of what was already transferred. Rsync provides `--partial` and `--partial-dir` to keep partially transferred files and resume them on retry. Without this, large file transfers over unreliable connections are fragile. **Suggested Fix:** 1. Write files to a `.part` temp name first, then atomically rename on completion 2. Store transfer state to allow resuming 3. Add `--partial` and `--partial-dir` CLI options **Severity:** medium
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#37