Skip to content

Return Unavailable when resuming an active ByteStream upload - #2889

Open
ashishsonamm wants to merge 1 commit into
TraceMachina:mainfrom
ashishsonamm:fix-bytestream-resume-while-active
Open

ashishsonamm wants to merge 1 commit into
TraceMachina:mainfrom
ashishsonamm:fix-bytestream-resume-while-active

Conversation

@ashishsonamm

Copy link
Copy Markdown
Contributor

What and why

A ByteStream resume (offset > 0) that arrives while the server still thinks the old stream is active was treated as a UUID collision, restarted at offset 0, and failed with non-retryable InvalidArgument. It now returns Unavailable, so the
client retries and joins the idle stream. Offset-0 collisions are unchanged.

Fixes #2888

How was this verified?

New test resume_while_previous_stream_still_active: fails on main with Received out of order data. Got 5, expected 0, passes with the fix (gets Unavailable, then the retry completes the upload). Hit the same error in a real Bazel build uploading a 235 MB blob.

Risk

Low. Only changes offset > 0 writes to a still-active UUID, which always failed before. Adds one pub accessor in nativelink-util.

AI assistance

Used Claude Code while debugging a failed build: it helped me find the collision path, and write a failing test. It drafted the fix and I reviewed and tested it and understand every line.

@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Oct 4, 2026 8:17am UTC
nativelink-aidm Ready Ready Preview Oct 4, 2026 8:17am UTC

Request Review

@modernmedici

Copy link
Copy Markdown
Collaborator

Thanks @ashishsonamm we are taking a look at this.

This branch was successfully deployed

2 active deployments
Preview – nativelink — d738fba5 Deployed Oct 4, 2026 by vercel[bot]
Preview – nativelink-aidm — d738fba5 Deployed Oct 4, 2026 by vercel[bot]
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.

[Bug]: ByteStream: resume at offset > 0 fails with InvalidArgument while the old stream is still active

2 participants