Skip to content

inspect: read only the end of each segment over HTTP - #748

Merged
dfa1 merged 1 commit into
mainfrom
inspect-http-743
Nov 13, 2026
Merged

dfa1 merged 1 commit into
mainfrom
inspect-http-743

Conversation

@dfa1

@dfa1 dfa1 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Closes #743. inspect fetched every segment of a remote file to read its array node; it now fetches each segment's last 4 KiB, concurrently, and shows progress.

Not measured against the Hugging Face file from the ticket; covered by WriterHttpTailTest (tails equal the segment ends, under 10% of segment bytes fetched).

🤖 Generated with Claude Code

`vortex inspect <https url>` downloaded the whole file, one segment per
request, to print metadata: 1,098 sequential requests, 110 MB and 226 s
for a 105 MB file. It only needs each flat segment's array node, which
sits at the segment's end.

- VortexHandle.segmentTail reads the end of a segment. VortexHttpReader
  fetches the last 4 KiB, then the exact node when its trailing length
  says it is larger; the default (mmap) returns the whole segment, which
  is free there.
- VortexHandle.prefetchTails starts those requests together on virtual
  threads, 32 in flight (a tail is a few KiB, so the round trip
  dominates). Reads stay on the opening thread: a mmap handle's confined
  arena cannot be read from workers. Zone-map tables are prefetched too.
- An unexpected HTTP status reports the server's x-error-message and
  Retry-After, so Hugging Face's 429 says what to do.
- inspect reports segment progress on stderr and prints an expected
  error once, without its stack.

Closes #743

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@dfa1
dfa1 merged commit cfa43b8 into main Nov 13, 2026
6 checks passed
@dfa1
dfa1 deleted the inspect-http-743 branch November 13, 2026 19:39
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.

inspect over HTTP downloads the whole file, one segment per request

1 participant