-
Notifications
You must be signed in to change notification settings - Fork 5.1k
fetch/S3: one high-water-mark rule for response-body backpressure; Bun.write(dest, response) streams to disk #39690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Jarred-Sumner
merged 30 commits into
main
from
farm/7dcb608f/fetch-abandoned-body-drain-cap
Aug 25, 2026
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
f4e37fc
fetch: receive an untouched body up to the mark, abort it once its Re…
robobun 2df2c13
Body: make the stream of a body that already failed the body's stream
robobun 2f83da6
fetch: a Bun.write() consumer keeps a collected Response's body loadi…
robobun f08c478
fetch: one high-water-mark rule for receive backpressure, one abandon…
Jarred-Sumner 18ccd6e
[autofix.ci] apply automated fixes
autofix-ci[bot] 70c94ad
fetch: don't enter BufferAll for readableStreamTo*(res.body)
Jarred-Sumner dfdbc95
Bun.write(path, response): stream the body into the file
Jarred-Sumner 6f64826
Bun.write(path, stream): reject on write errors, count string chunks,…
Jarred-Sumner a3ed3c4
test(bun-write): await the rejects assertions
robobun 656599f
Blob: safety comments on the new unsafe blocks, drop a needless borrow
robobun f2e36e4
Bun.write(dest, readableStream): pipe the stream instead of stringify…
Jarred-Sumner 3bd8ab2
test(bun-write): await the rejects assertion in the ReadableStream so…
Jarred-Sumner 611a586
[autofix.ci] apply automated fixes
autofix-ci[bot] fdd1c1d
s3: receive backpressure for downloads, same rule as fetch
Jarred-Sumner 962c7bf
One ProducerHold for fetch and S3 body streams; FileSink counts only …
Jarred-Sumner e31f379
Bun.write(dest, stream): a held reader owns the body; settle on Windo…
Jarred-Sumner 33722c7
[autofix.ci] apply automated fixes
autofix-ci[bot] 868929a
s3: one documented unsafe deref of the task in after_chunk_delivered
robobun 055ad4c
s3: statement-scoped unsafe derefs of the task, each with its safety …
robobun 06cc920
s3: no reference into the download task or its wrapper spans the chun…
robobun 45d00b9
s3: a streamed upload resolves with the bytes written, not 0
Jarred-Sumner c58a6db
s3: do not pause the transport behind an error body
robobun bb751b9
s3: don't pause an error body; free the writer() NetworkSink
Jarred-Sumner 93e1718
tests: await events instead of polling; ByteStream: a cancelled sourc…
Jarred-Sumner c4bd703
NewSource: root_wrapper/unroot_wrapper take the source pointer, not &…
robobun 13dacd4
Merge branch 'main' into farm/7dcb608f/fetch-abandoned-body-drain-cap
robobun 427f1fc
[autofix.ci] apply automated fixes
autofix-ci[bot] 94cb9ca
s3: writer().end() counts the bytes from the upload, not from the sin…
robobun 596869c
s3, fetch: shorter comments on the callback argument and on_stream_ca…
robobun b899dda
tests: drain both pipes of the two spawned clients; the bun-write ori…
robobun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.