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

http: make sure end is always emitted with keepalive connections by mcollina · Pull Request #29263 · nodejs/node · GitHub

/ node Public

http: make sure end is always emitted with keepalive connections - #29263

Closed
mcollina wants to merge 2 commits into
nodejs:masterfrom
mcollina:fix-autocannon
Closed

http: make sure end is always emitted with keepalive connections #29263
mcollina wants to merge 2 commits into
nodejs:masterfrom
mcollina:fix-autocannon

Conversation

Copy link
Copy Markdown
Member

Unfortunately 779a05d introduced a regression in 12.8.0, making the autocannon test failing on Node 12. This PR reverts 779a05d and adds a test to ensure that we do not regress again.

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

This test covers a regression where 'end' was not emitted in the case
of keepalive requests without parsing the full body.
mcollina requested review from addaleax and lpinca August 22, 2019 09:46
nodejs-github-bot added the http Issues or PRs related to the http subsystem. label Aug 22, 2019
mcollina requested review from Trott and benjamingr August 22, 2019 09:51

Copy link
Copy Markdown
Member Author

cc @indutny

Copy link
Copy Markdown
Collaborator

lpinca commented Aug 22, 2019

Copy link
Copy Markdown
Member

#9668 should be reopened if/when this is merged.

Copy link
Copy Markdown
Collaborator

mcollina added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Aug 23, 2019

Trott commented Aug 24, 2019

Copy link
Copy Markdown
Member

Landed in d5c3837...b3172f8

Trott closed this Aug 24, 2019
Trott pushed a commit that referenced this pull request Aug 24, 2019
This reverts commit 779a05d.

PR-URL: #29263
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Trott pushed a commit that referenced this pull request Aug 24, 2019
This test covers a regression where 'end' was not emitted in the case
of keepalive requests without parsing the full body.

PR-URL: #29263
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

ronag commented Aug 24, 2019
edited
Loading

Copy link
Copy Markdown
Member

This is a bit strange to me. In resOnFinish we emit req.'close'. So essentially the "bug" here is that we emit req.'end' when req.'close' has already been emitted. I think we have a different bug here as well in relation to req.'close'. I'll see if I can make a test. EDIT: yep nxtedition#1

Copy link
Copy Markdown
Member

@ronag The issue is that in resOnFinish the request might not have ended as a readable stream yet. I’m opening a new PR to fix this properly.

(Aside, if there’s a regression with one of my PRs, feel free to @addaleax me because I’ve configured my inbox to give explicit mentions of my handledhigher priority over other messages.)

addaleax added a commit to addaleax/node that referenced this pull request Aug 24, 2019
This resolves a memory leak for keep-alive connections and does not
regress in the way that 779a05d did by waiting for
the incoming request to be finished before releasing the
`parser.incoming` object.

Refs: nodejs#28646
Refs: nodejs#29263
Fixes: nodejs#9668
targos pushed a commit that referenced this pull request Aug 26, 2019
This reverts commit 779a05d.

PR-URL: #29263
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Aug 26, 2019
This test covers a regression where 'end' was not emitted in the case
of keepalive requests without parsing the full body.

PR-URL: #29263
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos added a commit that referenced this pull request Aug 26, 2019
Notable changes:

This release fixes two regressions in the http module:

* Fixes an event listener leak in the HTTP client. This resulted in lots
  of warnings during npm/yarn installs.
  #29245
* Fixes a regression preventing the `'end'` event from being emitted for
  keepalive requests in case the full body was not parsed.
  #29263

PR-URL: #29321
mcollina deleted the fix-autocannon branch August 26, 2019 10:11
addaleax added a commit that referenced this pull request Aug 26, 2019
This resolves a memory leak for keep-alive connections and does not
regress in the way that 779a05d did by waiting for
the incoming request to be finished before releasing the
`parser.incoming` object.

Refs: #28646
Refs: #29263
Fixes: #9668

PR-URL: #29297
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
targos pushed a commit that referenced this pull request Aug 26, 2019
This resolves a memory leak for keep-alive connections and does not
regress in the way that 779a05d did by waiting for
the incoming request to be finished before releasing the
`parser.incoming` object.

Refs: #28646
Refs: #29263
Fixes: #9668

PR-URL: #29297
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
targos added a commit that referenced this pull request Aug 26, 2019
Notable changes:

This release fixes two regressions in the http module:

* Fixes an event listener leak in the HTTP client. This resulted in lots
  of warnings during npm/yarn installs.
  #29245
* Fixes a regression preventing the `'end'` event from being emitted for
  keepalive requests in case the full body was not parsed.
  #29263

PR-URL: #29321
targos added a commit that referenced this pull request Aug 26, 2019
Notable changes:

This release fixes two regressions in the http module:

* Fixes an event listener leak in the HTTP client. This resulted in lots
  of warnings during npm/yarn installs.
  #29245
* Fixes a regression preventing the `'end'` event from being emitted for
  keepalive requests in case the full body was not parsed.
  #29263

PR-URL: #29321
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

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. http Issues or PRs related to the http subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL