fix(deno): Propagate stream cancellation - #24054
Merged
andreiborza merged 1 commit intoSep 4, 2026
Merged
Conversation
Forward cancellation from monitored response streams to their source readers so upstream producers can stop work and release resources. Fixes getsentry#23895
psang39
marked this pull request as ready for review
September 4, 2026 06:31
psang39
requested review from
isaacs and
mydea
and removed request for
a team
September 4, 2026 06:32
|
Ran this on Also tried it against an endless pull-based source since that is the shape from the issue. Read two chunks, cancelled with a reason, waited 50ms. Pull count settled at 3 against 4 on the parent, the source Same probe on the parent commit and the source Looks merge-ready to me. |
andreiborza
approved these changes
Sep 4, 2026
andreiborza
left a comment
Member
There was a problem hiding this comment.
Hi, looks good to me. Thank you for the contribution!
andreiborza
added a commit
that referenced
this pull request
Sep 4, 2026
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #24054 Co-authored-by: andreiborza <168741329+andreiborza@users.noreply.github.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.
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).monitorStreamcreates a wrappingReadableStream, but did not forwardcancellation to the source reader. This meant upstream producers could
continue running after the response consumer disconnected.
This adds a
cancel(reason)handler which delegates toreader.cancel(reason), along with a regression test verifying that thecancellation reason reaches the source stream.
Closes #23895