Repository navigation
feat(io): range readers and a lazily fetched remote_buffer - #1
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reject reader sizes and read_ahead values that overflow the page math, retry the first-fetch tail after a failed first fetch, make planning exception-safe, crash rather than leave a failed batch readable, fetch nothing for empty requests, and check page ranges without overflow. Tests are stricter: one batch for concurrent ensures, writes to sealed pages fault, file backing is really file-backed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A thread waiting for another thread's fetch can now release an outer lock (Python's GIL) that the fetching thread needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ument the exactly-once contract Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…estination count remote_buffer can take a size its caller already queried (a remote size() is a request), check_present accepts an empty range at the end of the file, and local_range_reader rejects mismatched destination counts. Docs: one exception per bullet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
jeandet
added a commit
to jeandet/CDFpp
that referenced
this pull request
Nov 2, 2026
cpp_utils is pinned to the head of jeandet/cpp_utils#1 until it merges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeandet
added a commit
to jeandet/CDFpp
that referenced
this pull request
Nov 2, 2026
cpp_utils gains byte-range readers, a reserved memory region and a lazy remote buffer (jeandet/cpp_utils#1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeandet
added a commit
to SciQLop/CDFpp
that referenced
this pull request
Nov 2, 2026
cpp_utils gains byte-range readers, a reserved memory region and a lazy remote buffer (jeandet/cpp_utils#1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds what a parser needs to read a remote file (S3, HTTP) lazily, fetching each byte at most once. There is no network code: the transport is supplied by the caller.
range_reader: a concept for "give me these byte ranges", batched so a transport can fetch them concurrently. The batch fills every range or throws.local_range_reader: arange_readerover a local file that logs every call. It is used to test and measure what a remote reader would be asked for.reserved_region: memory the size of the file, whose pages can't be read until they are written and sealed. Backed by anonymous memory, or by a deleted temp file the OS can page out. Linux, macOS and Windows paths are included; only Linux was compiled locally.remote_buffer: the cache.ensure()widens each read to a read-ahead window, merges what is missing and fetches it in one batch. The first fetch also takes the tail of the file. Unfetched bytes raise incheck_present()and fault on a raw read, so they are never read as zeros. It is thread-safe and never calls the reader under its lock. A reader can supplyblocking_waitto release an outer lock (Python's GIL) while a thread waits for another thread's fetch.Used by CDFpp for remote CDF reads (branch
feat/remote-reads, opened once this PR is merged and the wrap is bumped).Tests: 38/38.
TestRemoteBufferalso passes under ThreadSanitizer. Fork-based probes check that unsealed pages fault.🤖 Generated with Claude Code