Skip to content

AVA1 1.0.12: read-back progress in Status, no second read-back after a resume in the same process - #19

Merged
phantomptr merged 1 commit into
mainfrom
readback-progress-873
Nov 22, 2026
Merged

phantomptr merged 1 commit into
mainfrom
readback-progress-873

Conversation

@phantomptr

Copy link
Copy Markdown
Owner

1.0.12

Read-back progress, and no second read-back of a resumed file in the same process. The wire format gains one
optional field (old peers skip it); nothing changes on disk.

C library:

  • Read-back: a job taken up again from its journal in the same process (a Stop then a resume, a failed job
    resumed, a job parked past its age) no longer reads back what its earlier run already read back. The
    process keeps each unfinished large file's read-back ranges when a job is destroyed, with the identity of its
    part file and outboard (device, inode, size, modify and change times), and the next run counts those ranges
    as read back when they are still durable by the journal and both files are unchanged. A file written in
    between, one whose read-back found it wrong, and any job after a restart are read back whole as before
    (§13.5). Before, a 156 GB part file resumed after a stop was read back again, mostly after its last byte:
    minutes of "finishing" with the upload done.
  • Status carries ext readback_left (tag 6) for a job with JF_READBACK: the bytes of its unfinished
    large files not read back yet, counting the commit's read-back as it goes, so a sender can show the
    read-back after the last byte as progress.
  • A write of file data that failed part way over bytes already read back takes them out of what was read
    back, as a write that succeeds does.

Rust sender:

  • Progress::readback_left holds the receiver's last readback_left (0 when it sends none).

For phantomptr/ps5upload#873.

  • make check (ava1-ctest incl. 3 new read-back tests), GCC 14 -Werror library build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT

…a resume in the same process

- C read-back: a job taken up again from its journal in the same process (a
  Stop then a resume, a failed job resumed, a job parked past its age) no
  longer reads back what its earlier run already read back. A destroyed job's
  unfinished large files keep their read-back ranges in memory with the
  identity of the part file and outboard (device, inode, size, modify and
  change times); the next run counts them as read back only when still
  durable by the journal and both files are unchanged. A file written in
  between, one found wrong before, and every job after a restart are read
  back whole as before.
- Status ext `readback_left` (tag 6) for a JF_READBACK job: bytes of its
  unfinished large files not read back yet, counting the commit's read-back
  as it goes. Older senders skip the tag.
- A data write that failed over bytes already read back takes them out of
  what was read back.
- Rust sender: Progress::readback_left.
- SPEC.md §13.5, changelog, version 1.0.12.

Tests: a_file_resumed_in_the_same_process_is_not_read_back_again (fails
without the fix: 40 MiB read back instead of 20), a_file_written_between_two_runs_is_read_back_whole,
a_job_without_the_read_back_reports_no_readback_left,
status_readback_left_is_an_optional_extension. `make check` passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
@phantomptr
phantomptr merged commit ae1d471 into main Nov 22, 2026
25 checks passed
@phantomptr
phantomptr deleted the readback-progress-873 branch November 22, 2026 19:03
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.

2 participants