-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http, timers: remove domain specific code #18477
Conversation
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.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we clear the timeout only on second call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
For posterity, would you be able to add a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 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), orvcbuild test
(Windows) passesAffected core subsystem(s)
http, timers