GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stream: drain pending writes before broadcast end by trivikr · Pull Request #65334 · nodejs/node

Conversation

@trivikr

@trivikr trivikr commented Aug 16, 2026

Copy link
Copy Markdown
Member

Fixes: #65333

Keep processing writes that were queued before end(). Signal the broadcast end only after those writes enter the shared buffer.

Resolve end() after all consumers reach end-of-stream. This prevents backpressured writes from remaining pending forever.


Assisted-by: codex:gpt-5.6-sol

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to Node.js streams. labels Aug 16, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.04348% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.14%. Comparing base (453f47a) to head (c28857e).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/streams/iter/broadcast.js 88.04% 9 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #65334   +/-   ##
=======================================
  Coverage   90.14%   90.14%           
=======================================
  Files         751      751           
  Lines      252709   252767   +58     
  Branches    47557    47588   +31     
=======================================
+ Hits       227800   227861   +61     
+ Misses      16206    16202    -4     
- Partials     8703     8704    +1     
Files with missing lines Coverage Δ
lib/internal/streams/iter/broadcast.js 88.44% <88.04%> (+0.41%) ⬆️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Aug 17, 2026
View reviewed changes
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 17, 2026
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

nodejs-github-bot commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/75956/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr trivikr added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Aug 23, 2026
@trivikr
stream: drain pending writes before broadcast end
c28857e
Keep processing writes that were queued before end(). Signal the
broadcast end only after those writes enter the shared buffer.

Resolve end() after all consumers reach end-of-stream. This prevents
backpressured writes from remaining pending forever.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: codex:gpt-5.6-sol
PR-URL: nodejs#65334
Fixes: nodejs#65333
Reviewed-By: James M Snell <[email protected]>
@trivikr
trivikr force-pushed the stream-iter-bc-end-stranding-writes-2 branch from 7e864ea to c28857e Compare August 23, 2026 20:26
@trivikr
trivikr merged commit c28857e into nodejs:main Aug 23, 2026
20 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@trivikr

trivikr commented Aug 23, 2026

Copy link
Copy Markdown
Member Author

Landed in c28857e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95 pushed a commit that referenced this pull request Aug 25, 2026
@trivikr @aduh95
stream: drain pending writes before broadcast end
ef7c8a8
Keep processing writes that were queued before end(). Signal the
broadcast end only after those writes enter the shared buffer.

Resolve end() after all consumers reach end-of-stream. This prevents
backpressured writes from remaining pending forever.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: codex:gpt-5.6-sol
PR-URL: #65334
Fixes: #65333
Reviewed-By: James M Snell <[email protected]>
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
@trivikr @aduh95
stream: drain pending writes before broadcast end
dc51c79
Keep processing writes that were queued before end(). Signal the
broadcast end only after those writes enter the shared buffer.

Resolve end() after all consumers reach end-of-stream. This prevents
backpressured writes from remaining pending forever.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: codex:gpt-5.6-sol
PR-URL: #65334
Fixes: #65333
Reviewed-By: James M Snell <[email protected]>
@github-actions github-actions Bot mentioned this pull request Aug 25, 2026
2026-08-26, Version 26.8.0 (Current) #65551
Merged
aduh95 pushed a commit that referenced this pull request Aug 27, 2026
@trivikr @aduh95
stream: drain pending writes before broadcast end
32dbd80
Keep processing writes that were queued before end(). Signal the
broadcast end only after those writes enter the shared buffer.

Resolve end() after all consumers reach end-of-stream. This prevents
backpressured writes from remaining pending forever.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: codex:gpt-5.6-sol
PR-URL: #65334
Fixes: #65333
Reviewed-By: James M Snell <[email protected]>
@trivikr
trivikr deleted the stream-iter-bc-end-stranding-writes-2 branch September 7, 2026 01:16
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026
2026-09-08, Version 24.21.0 'Krypton' (LTS) #65873
Merged
aduh95 pushed a commit that referenced this pull request Sep 7, 2026
@trivikr @aduh95
stream: drain pending writes before broadcast end
feb0d57
Keep processing writes that were queued before end(). Signal the
broadcast end only after those writes enter the shared buffer.

Resolve end() after all consumers reach end-of-stream. This prevents
backpressured writes from remaining pending forever.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: codex:gpt-5.6-sol
PR-URL: #65334
Fixes: #65333
Reviewed-By: James M Snell <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 7, 2026
@trivikr @aduh95
stream: drain pending writes before broadcast end
93d822b
Keep processing writes that were queued before end(). Signal the
broadcast end only after those writes enter the shared buffer.

Resolve end() after all consumers reach end-of-stream. This prevents
backpressured writes from remaining pending forever.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: codex:gpt-5.6-sol
PR-URL: #65334
Fixes: #65333
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. stream Issues and PRs related to Node.js streams.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

stream/iter: BroadcastWriter.end() strands backpressured writes and truncates the broadcast

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@trivikr @nodejs-github-bot @jasnell
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.