Pin error() during a pending close in the readable stream suites - #7335
Open
jasnell wants to merge 1 commit into
Open
Pin error() during a pending close in the readable stream suites#7335jasnell wants to merge 1 commit into
jasnell wants to merge 1 commit into
Conversation
After close() with a chunk still queued the stream has only requested its close and, per spec, is still readable, so a later error() errors it and discards the queue; the TypeScript implementation does that, while the C++ implementation treats the requested close as final, ignores the late error and drains the chunk to a clean close (and, for byte streams, already reports desiredSize as 0 rather than the high-water mark minus the queued bytes). Both suites pinned error() after a completed close only; pin the pending-close ordering on each side and record it in the ledgers.
Contributor
|
LGTM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7335 +/- ##
==========================================
- Coverage 37.35% 37.25% -0.11%
==========================================
Files 806 810 +4
Lines 253047 253975 +928
Branches 20087 20103 +16
==========================================
+ Hits 94526 94608 +82
- Misses 147114 147952 +838
- Partials 11407 11415 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
After close() with a chunk still queued the stream has only requested its close and, per spec, is still readable, so a later error() errors it and discards the queue; the TypeScript implementation does that, while the C++ implementation treats the requested close as final, ignores the late error and drains the chunk to a clean close (and, for byte streams, already reports desiredSize as 0 rather than the high-water mark minus the queued bytes). Both suites pinned error() after a completed close only; pin the pending-close ordering on each side and record it in the ledgers.