You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Buffered origin pull-through loads the whole blob into memory before serving #1132
The buffered origin pull-through (cache.populate → engine.pull_through → origin.fetch) reads the entire blob from the origin into memory (and imports it into the store) before any byte is served. For large blobs this spikes RAM proportional to blob size — observed serving a 708 MB blob (~700 MB transient).
Detail
The window-paced pull-through (#856) bounds per-request exposure to pull_ahead_bytes for offset-0 paid requests, but the buffered fallback path still buffers the whole blob. Any request that routes to the buffered path (resumed request, non-offset-0, or when the window provider is unattached) loads the full blob.
Fix
Stream the origin read → BLAKE3-verify → serve/store incrementally, bounding memory to a fixed window regardless of which pull-through path is taken. (For fs origins the zero-copy pass-through issue streams directly from the file; this issue covers the http/s3 buffered path.)
Automated triage note for a later run: current main has changed materially since this was filed. CacheEngine::pull_through_attempt now streams origin bodies larger than origin_retry.buffered_max_bytes into the store via import_and_verify_stream; only small bodies take drain_to_bytes. CacheEngine::get still waits for commit and then read_local before returning to the serve path.
Please clarify whether the remaining goal is (1) bounded memory only, in which case the large-blob premise may already be fixed and this issue should be re-verified/closed, or (2) serving bytes to the client before the raw HTTP/S3 origin body has completed whole-root BLAKE3 verification. The latter needs an explicit authenticity design (for example a proof/outboard source); a raw stream cannot be authenticated against its final BLAKE3 root incrementally without such proof. That choice is security-relevant and should be pinned before dispatch.
Activity
fix: make the reservation structural, and correct the claims that wer…
fix: bound the requester's fetch loop, and classify what comes back (#…
altanoruc commentedon Jul 19, 2026
Automated triage note for a later run: current main has changed materially since this was filed. CacheEngine::pull_through_attempt now streams origin bodies larger than origin_retry.buffered_max_bytes into the store via import_and_verify_stream; only small bodies take drain_to_bytes. CacheEngine::get still waits for commit and then read_local before returning to the serve path.
Please clarify whether the remaining goal is (1) bounded memory only, in which case the large-blob premise may already be fixed and this issue should be re-verified/closed, or (2) serving bytes to the client before the raw HTTP/S3 origin body has completed whole-root BLAKE3 verification. The latter needs an explicit authenticity design (for example a proof/outboard source); a raw stream cannot be authenticated against its final BLAKE3 root incrementally without such proof. That choice is security-relevant and should be pinned before dispatch.