FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

stream: don't flush destroyed writable by ronag · Pull Request #29028 · nodejs/node · GitHub

/ node Public

stream: don't flush destroyed writable - #29028

Closed
ronag wants to merge 4 commits into
nodejs:masterfrom
nxtedition:stream-flush-destroýed-writable

Hidden character warning

The head ref may contain hidden characters: "stream-flush-destro\u00fded-writable"
Closed

stream: don't flush destroyed writable#29028
ronag wants to merge 4 commits into
nodejs:masterfrom
nxtedition:stream-flush-destroýed-writable

Conversation

ronag commented Aug 6, 2019
edited
Loading

Copy link
Copy Markdown
Member

It doesn't make much sense (and is a bit weird) to flush a stream which has been destroyed.

I need help creating a relevant test for this.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

NOTE TO SELF: Look into needFinish & stream destroyed. errorOrDestroy added in this PR should preferably be async.

nodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label Aug 6, 2019
ronag force-pushed the stream-flush-destroýed-writable branch 4 times, most recently from 3b3305a to 481e6d1 Compare August 6, 2019 20:20
Comment thread lib/_stream_writable.js Outdated
ronag force-pushed the stream-flush-destroýed-writable branch from 481e6d1 to 44d3d57 Compare August 6, 2019 23:00
jasnell requested review from mafintosh and mcollina August 7, 2019 00:26

jasnell commented Aug 7, 2019

Copy link
Copy Markdown
Member

Hmm.. I'm thinking this is more bug fix than breaking change. What do you think @mcollina?

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This will need a unit test.

I'm happy to land this as a bug fix as long as it does not break anything on CITGM.

Copy link
Copy Markdown
Member

def bugfix

Copy link
Copy Markdown
Collaborator

ronag force-pushed the stream-flush-destroýed-writable branch from 44d3d57 to 7332cb5 Compare August 7, 2019 09:50

ronag commented Aug 7, 2019

Copy link
Copy Markdown
Member Author

test added and fixed

ronag force-pushed the stream-flush-destroýed-writable branch from 7332cb5 to 0906aa6 Compare August 7, 2019 09:56
Comment thread lib/_stream_writable.js Outdated
ronag force-pushed the stream-flush-destroýed-writable branch 2 times, most recently from f0ea5f3 to 372588a Compare August 7, 2019 09:58

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I would still consider this a bugfix, but we should:

  1. verify that CITGM passes
  2. let it bake for LTS (10.x) for some time before backporting.

Copy link
Copy Markdown
Collaborator

mcollina commented Aug 7, 2019

Copy link
Copy Markdown
Member

ronag force-pushed the stream-flush-destroýed-writable branch from 372588a to e1542b7 Compare August 7, 2019 12:44

ronag commented Aug 7, 2019
edited
Loading

Copy link
Copy Markdown
Member Author

@mcollina: Sorry, found further issues.

Consider the updated tests. We now will throw ERR_STREAM_DESTROYED on some tests that assume ERR_STREAM_WRITE_AFTER_END also we now send the err on the write callback and don't emit it as an error on the stream.

How should this be?

addaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I wouldn’t mind being careful and labelling this semver-major.

Comment thread lib/_stream_writable.js Outdated
ronag force-pushed the stream-flush-destroýed-writable branch from e1542b7 to d7e8b4c Compare August 7, 2019 14:14

ronag commented Aug 7, 2019
edited
Loading

Copy link
Copy Markdown
Member Author

Ok, I think everything (expect @mcollina's comment on !err && chinksWritten++) is fixed in a sensical manner.

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

Labels

semver-major PRs that contain breaking changes and should be released in the next major version. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL