GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — stream: keep async context of fromWeb writes by mcollina · Pull Request #67055 · nodejs/node Conversation
Member
Since #65548,
This restores the previous behavior without touching the steady-state path:
The new test covers Benchmarks ( #65548 is in v26.10.0 and on v24.x-staging, so this should follow it to both lines. While working on this I found a separate, pre-existing bug, also present in v26.5.1: Refs: #66906 🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsWritable.fromWeb() and Duplex.fromWeb() dispatch writes to the WritableStream directly and complete them through a shared write tracker. A write issued before the WritableStream had started was queued and processed from its start step, so the sink ran in the async context of the code that created the WritableStream, and the tracker invoked the Node.js write callback synchronously from whatever context completed the sink write, so the writes and final() it released ran there too. The promise-based adapter waited for writer.ready and received the result through a reaction, both in the context of the Node.js write. Dispatch writes issued before the start from a writer.ready reaction, failing them if the stream was closed or errored meanwhile, and deliver the write callback in the context of the Node.js write, from a reaction when it completes in another context. Refs: nodejs#66906 Refs: nodejs#65548 Signed-off-by: Matteo Collina <[email protected]>
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #67055 +/- ## ========================================== + Coverage 90.47% 90.65% +0.17% ========================================== Files 791 797 +6 Lines 277245 278353 +1108 Branches 53310 53529 +219 ========================================== + Hits 250834 252329 +1495 + Misses 16811 16401 -410 - Partials 9600 9623 +23
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 1206541 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Writable.fromWeb() and Duplex.fromWeb() dispatch writes to the WritableStream directly and complete them through a shared write tracker. A write issued before the WritableStream had started was queued and processed from its start step, so the sink ran in the async context of the code that created the WritableStream, and the tracker invoked the Node.js write callback synchronously from whatever context completed the sink write, so the writes and final() it released ran there too. The promise-based adapter waited for writer.ready and received the result through a reaction, both in the context of the Node.js write. Dispatch writes issued before the start from a writer.ready reaction, failing them if the stream was closed or errored meanwhile, and deliver the write callback in the context of the Node.js write, from a reaction when it completes in another context. Refs: #66906 Refs: #65548 Signed-off-by: Matteo Collina <[email protected]> PR-URL: #67055 Refs: #67052 Refs: #67054 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Writable.fromWeb() and Duplex.fromWeb() dispatch writes to the WritableStream directly and complete them through a shared write tracker. A write issued before the WritableStream had started was queued and processed from its start step, so the sink ran in the async context of the code that created the WritableStream, and the tracker invoked the Node.js write callback synchronously from whatever context completed the sink write, so the writes and final() it released ran there too. The promise-based adapter waited for writer.ready and received the result through a reaction, both in the context of the Node.js write. Dispatch writes issued before the start from a writer.ready reaction, failing them if the stream was closed or errored meanwhile, and deliver the write callback in the context of the Node.js write, from a reaction when it completes in another context. Refs: #66906 Refs: #65548 Signed-off-by: Matteo Collina <[email protected]> PR-URL: #67055 Refs: #67052 Refs: #67054 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Writable.fromWeb() and Duplex.fromWeb() dispatch writes to the WritableStream directly and complete them through a shared write tracker. A write issued before the WritableStream had started was queued and processed from its start step, so the sink ran in the async context of the code that created the WritableStream, and the tracker invoked the Node.js write callback synchronously from whatever context completed the sink write, so the writes and final() it released ran there too. The promise-based adapter waited for writer.ready and received the result through a reaction, both in the context of the Node.js write. Dispatch writes issued before the start from a writer.ready reaction, failing them if the stream was closed or errored meanwhile, and deliver the write callback in the context of the Node.js write, from a reaction when it completes in another context. Refs: #66906 Refs: #65548 Signed-off-by: Matteo Collina <[email protected]> PR-URL: #67055 Refs: #67052 Refs: #67054 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Writable.fromWeb() and Duplex.fromWeb() dispatch writes to the WritableStream directly and complete them through a shared write tracker. A write issued before the WritableStream had started was queued and processed from its start step, so the sink ran in the async context of the code that created the WritableStream, and the tracker invoked the Node.js write callback synchronously from whatever context completed the sink write, so the writes and final() it released ran there too. The promise-based adapter waited for writer.ready and received the result through a reaction, both in the context of the Node.js write. Dispatch writes issued before the start from a writer.ready reaction, failing them if the stream was closed or errored meanwhile, and deliver the write callback in the context of the Node.js write, from a reaction when it completes in another context. Refs: nodejs#66906 Refs: nodejs#65548 Signed-off-by: Matteo Collina <[email protected]> PR-URL: nodejs#67055 Refs: nodejs#67052 Refs: nodejs#67054 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.