Skip to content

Spool object-store parts to scratch before decoding - #88

Open
harshil-goel wants to merge 2 commits into
mainfrom
kevin/s3-bootstrap
Open

Spool object-store parts to scratch before decoding #88
harshil-goel wants to merge 2 commits into
mainfrom
kevin/s3-bootstrap

Conversation

@harshil-goel

Copy link
Copy Markdown
Contributor

No description provided.

Base automatically changed from harshil/slot-fix to main August 19, 2026 14:13
heavycrystal and others added 2 commits August 19, 2026 19:43
collect waited for all 118 parts before anyone read a result, so a part
that died at the 60s reqwest body deadline stayed invisible for the 47
minutes the rest took to drain. try_collect returns on the first error
and drops the stream, cancelling the parts still in flight.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The tar pump read straight off the live S3 body, so request lifetime
tracked how fast the sink drained rather than how fast the object
downloaded. walrus caps a request at 60s and a 700-800MB part takes
longer than that to clear the batcher, so the body died mid-part and
took the whole bootstrap with it.

Drain the part to the caller's scratch root first, then decode from the
file. The GET now completes at network speed. Bytes are spooled still
compressed, so scratch tracks object size, and the file is unlinked
right after writing so no error path can leak it.

Costs parallelism x part_size of disk, which is a reason to keep
object_store_parallelism low on large parts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

3 participants