Skip to content

AVA1 1.0.11: read-back of a resumed file while it arrives - #18

Merged
phantomptr merged 1 commit into
mainfrom
readback-resumed
Nov 19, 2026
Merged

phantomptr merged 1 commit into
mainfrom
readback-resumed

Conversation

@phantomptr

Copy link
Copy Markdown
Owner

A large file resumed from the journal had what it held durable from before read back only after its last byte, while the sender had nothing left to send. On a big file that was minutes of finishing after the upload looked done.

  • C read-back: when a resumed job's map is answered, the durable ranges nobody has read back are handed to the live read-back, so they are read while the rest of the file arrives. Nothing is reported to the sender (durable counts are unchanged), a range already read, queued or being read is not handed over twice, and a byte found wrong still has the file sent again.
  • Rust sender: a cancel during the up-front space check ends the job at once and tells the receiver, instead of waiting for the check.
  • Version 1.0.11, changelog, SPEC.md §13.5. Wire format unchanged.

New tests (each fails without its fix):

  • a_resumed_file_is_read_back_while_the_rest_arrives: 20 MiB durable before the stop, 41 MiB file. Before: only the 10 MiB sent after the resume was read live. After: all 40 MiB read live before the last stretch, 0 MiB after the last byte.
  • a_byte_changed_before_the_interruption_is_found_while_the_resumed_file_arrives
  • a_cancel_during_a_slow_space_check_ends_the_job_at_once

make check passes locally (802 tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT

A large file resumed from the journal had what it held durable from
before read back only after its last byte, while the sender had nothing
left to send. When the job's map is answered, those ranges are now
handed to the live read-back (ava1_apply_readback_resumed), so they are
read while the rest of the file arrives. A range already read back,
queued or being read is not handed over again; nothing is reported to
the sender, so durable byte counts are unchanged. A mismatch is acted on
at the commit as any live one: the file is sent again.

The Rust sender polls its cancel flag while the up-front space check
runs, so a cancel no longer waits for a slow check.

New tests:
- a_resumed_file_is_read_back_while_the_rest_arrives
- a_byte_changed_before_the_interruption_is_found_while_the_resumed_file_arrives
- a_cancel_during_a_slow_space_check_ends_the_job_at_once

Version 1.0.11, changelog, SPEC.md §13.5. Wire format unchanged.

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