Skip to content

stream: prevent share from eagerly draining source - #65338

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-share-drop-newest-eager-drain
Open

stream: prevent share from eagerly draining source#65338
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-share-drop-newest-eager-drain

Conversation

@trivikr

@trivikr trivikr commented Aug 16, 2026

Copy link
Copy Markdown
Member

Fixes: #65337

Wait for buffer space after drop-newest discards an upstream result. This keeps one consumer pull from draining the source or looping indefinitely while a slower consumer keeps the buffer full.


Assisted-by: codex:gpt-5.6-sol

Wait for buffer space after drop-newest discards an upstream result.
This keeps one consumer pull from draining the source or looping
indefinitely while a slower consumer keeps the buffer full.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem. labels Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (ad7a5b8) to head (2fc833c).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65338      +/-   ##
==========================================
+ Coverage   90.11%   90.12%   +0.01%     
==========================================
  Files         752      752              
  Lines      251569   251583      +14     
  Branches    47268    47270       +2     
==========================================
+ Hits       226701   226751      +50     
+ Misses      16233    16176      -57     
- Partials     8635     8656      +21     
Files with missing lines Coverage Δ
lib/internal/streams/iter/share.js 86.10% <100.00%> (+0.62%) ⬆️

... and 37 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.

@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 17, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 17, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream/iter: Share "drop-newest" can eagerly drain the upstream source

3 participants