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

http, timers: remove domain specific code by apapirovski · Pull Request #18477 · nodejs/node · GitHub

/ node Public

http, timers: remove domain specific code - #18477

Closed
apapirovski wants to merge 2 commits into
nodejs:masterfrom
apapirovski:patch-domain-usage
Closed

http, timers: remove domain specific code#18477
apapirovski wants to merge 2 commits into
nodejs:masterfrom
apapirovski:patch-domain-usage

Conversation

Copy link
Copy Markdown
Contributor

This PR removes some domain specific code that is no longer necessary due to the changes in semantics of how domains are tracked.

This will need a CitGM run to make sure no one is relying on the current behaviour but the interaction with the actual domain module remains the same, so hopefully this should be fine.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

http, timers

Due to some changes to async tracking of http and also
in how domains are handled, it's no logner necessary
to manually copy domain from req to res in http code.
It is no longer necessary to explicitly set the handle
to inherit the Timeout domain.
apapirovski added http Issues or PRs related to the http subsystem. domain Issues and PRs related to the domain subsystem. timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. labels Jan 31, 2018
nodejs-github-bot added http Issues or PRs related to the http subsystem. timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. labels Jan 31, 2018

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor Author

CitGM is clean, reasonably certain this PR is safe for the portion of the ecosystem that uses domains.

@@ -30,13 +30,19 @@ timeoutd.on('error', common.mustCall(function(e) {
assert.strictEqual(e.message, 'Timeout UNREFd',
'Domain should catch timer error');
clearTimeout(timeout);

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

Should we clear the timeout only on second call?

Copy link
Copy Markdown
Contributor Author

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

It shouldn't matter. They will all fire during the same loop run. That timeout is just there to make sure it doesn't exit before it gets a chance to enter the event loop.

Copy link
Copy Markdown
Contributor

For posterity, would you be able to add a Refs: to where internals changed, so we don't need these lines anymore? Otherwise SGTM

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Feb 1, 2018

Fishrock123 left a comment

Copy link
Copy Markdown
Contributor

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

Nice.

Copy link
Copy Markdown
Contributor Author

Landed in 7020bc6 and fc96743

apapirovski closed this Feb 4, 2018
apapirovski added a commit that referenced this pull request Feb 4, 2018
Due to some changes to async tracking of http and also
in how domains are handled, it's no longer necessary
to manually copy domain from req to res in http code.

PR-URL: #18477
Refs: #16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
apapirovski added a commit that referenced this pull request Feb 4, 2018
It is no longer necessary to explicitly set the handle
to inherit the Timeout domain.

PR-URL: #18477
Refs: #16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
apapirovski deleted the patch-domain-usage branch February 4, 2018 13:28
addaleax removed the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Feb 4, 2018
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
Due to some changes to async tracking of http and also
in how domains are handled, it's no longer necessary
to manually copy domain from req to res in http code.

PR-URL: #18477
Refs: #16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
It is no longer necessary to explicitly set the handle
to inherit the Timeout domain.

PR-URL: #18477
Refs: #16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
Due to some changes to async tracking of http and also
in how domains are handled, it's no longer necessary
to manually copy domain from req to res in http code.

PR-URL: #18477
Refs: #16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
It is no longer necessary to explicitly set the handle
to inherit the Timeout domain.

PR-URL: #18477
Refs: #16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
Due to some changes to async tracking of http and also
in how domains are handled, it's no longer necessary
to manually copy domain from req to res in http code.

PR-URL: #18477
Refs: #16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
It is no longer necessary to explicitly set the handle
to inherit the Timeout domain.

PR-URL: #18477
Refs: #16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins mentioned this pull request Feb 21, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Due to some changes to async tracking of http and also
in how domains are handled, it's no longer necessary
to manually copy domain from req to res in http code.

PR-URL: nodejs#18477
Refs: nodejs#16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
It is no longer necessary to explicitly set the handle
to inherit the Timeout domain.

PR-URL: nodejs#18477
Refs: nodejs#16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
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

domain Issues and PRs related to the domain subsystem. http Issues or PRs related to the http subsystem. timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants


Back | FazBrowse Home | New Git URL