Skip to content

http: change totalSocketCount only on socket creation or when the socket is closed - #40572

Merged
Trott merged 1 commit into
nodejs:masterfrom
jodevsa:remove_socket_count_increment
Nov 10, 2021
Merged

http: change totalSocketCount only on socket creation or when the socket is closed#40572
Trott merged 1 commit into
nodejs:masterfrom
jodevsa:remove_socket_count_increment

Conversation

@jodevsa

@jodevsajodevsa commented Oct 22, 2021

Copy link
Copy Markdown
Contributor

@nodejs-github-botnodejs-github-bot added http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels Oct 22, 2021

@TrottTrott 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.

Can you please add a test?

@jodevsa
jodevsaforce-pushed the remove_socket_count_increment branch from a74c6c9 to d50c671CompareOctober 23, 2021 00:20
@jodevsa

Copy link
Copy Markdown
ContributorAuthor

@Trott
I added tests, but turns out it's not a bug :D I'll add more details in the issue, and see how to move forward. I think we have another bug, like the socketCount going down to -1 🙈

@jodevsajodevsa changed the title http: do not increment socketCount on existing socket reusehttp: add tests for http agent totalSocketCountOct 23, 2021
Comment threadtest/parallel/test-http-agent-keepalive.js Outdated
Comment threadtest/parallel/test-http-agent-keepalive.js Outdated
@jodevsa
jodevsaforce-pushed the remove_socket_count_increment branch from d50c671 to c907459CompareOctober 23, 2021 08:07
@jodevsajodevsa changed the title http: add tests for http agent totalSocketCounthttp: change totalSocketCount only on socket creation or when the socket is closedOct 23, 2021
@jodevsa
jodevsaforce-pushed the remove_socket_count_increment branch 2 times, most recently from 56415f8 to 2116b6aCompareOctober 23, 2021 08:18

@mcollinamcollina 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.

lgtm

@jodevsa

Copy link
Copy Markdown
ContributorAuthor

@mcollina is there a way to rerun the failed test?

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadlib/_http_agent.js Outdated
@nodejs-github-bot

This comment has been minimized.

@jodevsa
jodevsaforce-pushed the remove_socket_count_increment branch 2 times, most recently from aa0cced to 63d8bf7CompareOctober 23, 2021 20:00
@jodevsa
jodevsa requested a review from lpincaOctober 23, 2021 20:00
@jodevsa
jodevsaforce-pushed the remove_socket_count_increment branch from 72c7b65 to 09ab76bCompareOctober 23, 2021 20:18
Comment threadtest/parallel/test-http-upgrade-client.js Outdated
@jodevsa
jodevsaforce-pushed the remove_socket_count_increment branch 2 times, most recently from 9b9bf8c to e3f9bdcCompareOctober 24, 2021 11:34
@jodevsa
jodevsa requested a review from lpincaOctober 24, 2021 11:36
Comment threadtest/parallel/test-http-upgrade-agent.js Outdated
@jodevsa

Copy link
Copy Markdown
ContributorAuthor

@Trott I will try it out. Thanks for the update :)

@jodevsa

Copy link
Copy Markdown
ContributorAuthor

@Trott 1 failed :(

@nodejs-github-bot

This comment has been minimized.

@mcollinamcollina 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.

lgtm

@mcollina

Copy link
Copy Markdown
Member

@nodejs/build do you know why asan fails? Can we land anyway?

I'm trying to land this using "node-core-utils" and it is stuck at

Querying API for job/node-test-pull-request/40795/

@Trott

Trott commented Nov 9, 2021

Copy link
Copy Markdown
Member

@nodejs/build do you know why asan fails?

I don't know why ASAN fails frequently, but there's a Re-run Workflow button that I always click. I've re-run it here.

Can we land anyway?

Please don't. If it's a real failure, we want to know.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@TrottTrott added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 10, 2021
PR-URL: nodejs#40572
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
@Trott
Trottforce-pushed the remove_socket_count_increment branch from ef2c276 to d8f1823CompareNovember 10, 2021 02:16
@Trott

Copy link
Copy Markdown
Member

Landed in d8f1823

@Trott
Trott merged commit d8f1823 into nodejs:masterNov 10, 2021
@Trott

Copy link
Copy Markdown
Member

Thanks for the contribution! 🎉

And thanks for your patience and persistence!

targos pushed a commit that referenced this pull request Nov 21, 2021
PR-URL: #40572
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
@targostargos mentioned this pull request Nov 26, 2021
danielleadams pushed a commit that referenced this pull request Jan 30, 2022
PR-URL: #40572
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
danielleadams pushed a commit that referenced this pull request Feb 1, 2022
PR-URL: #40572
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
@danielleadamsdanielleadams mentioned this pull request Feb 1, 2022
@panvapanva removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 27, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.httpIssues or PRs related to the http subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can someone take a look at this code in _http_agent.js there may be a bug.

12 participants

@jodevsa@nodejs-github-bot@Mesteery@mcollina@richardlau@Trott@jasnell@lpinca@JungMinu@rickyes@VoltrexKeyva@panva