Uh oh!
There was an error while loading. Please reload this page.
async_hooks: prevent async storage methods leaking to outer context - #31950
async_hooks: prevent async storage methods leaking to outer context#31950Qard wants to merge 2 commits into
Conversation
Qard
commented
Feb 25, 2020
Also, with the addition of the |
vdeturckheim
left a comment
There was a problem hiding this comment.
Couple comments, also, I am afraid this comes with a perf cost in the *SyncAndReturn(...) methods
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Qard
commented
Feb 25, 2020
Yes, there would be some perf cost to the |
vdeturckheim
commented
Feb 25, 2020
Because of |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
puzpuzpuz
commented
Feb 25, 2020
This PR was aimed to fix nested Yet, I don't see any tests that verify the fix. |
Qard
commented
Feb 26, 2020
No it wasn't, I made this as an improvement not as a fix. I can rework it to verify that it fixes that too though, if you want, as it probably does. |
Qard
commented
Feb 26, 2020
Added a test to verify it fixes that issue. |
Qard
commented
Feb 26, 2020
I restored the Also, what do you all think about just making the |
puzpuzpuz
commented
Feb 26, 2020
I like the idea of keeping only a single pair of methods. But I'd rather rename |
Uh oh!
There was an error while loading. Please reload this page.
@Qard I don't really understand the benchmarks, did you delete one message? Also, if I understand well, we still introduce a perf impact on the sync path that grows with the number of concurent instances. I'd like to avoid this case. |
Qard
commented
Feb 26, 2020
Yes, I deleted a comment awhile ago as I ran the benchmark wrong. The correct benchmark is the one in the thread near the top of the PR. It shows that the performance difference is basically non-existent. |
5e07676 to
2b6a63cCompareQard
commented
Feb 28, 2020
Rebased as #31930 has landed now. |
2b6a63c to
23a0772CompareUh oh!
There was an error while loading. Please reload this page.
vdeturckheim
commented
Feb 28, 2020
Probably worth waiting for #31998 to land first |
417ff73 to
2db2994Comparepuzpuzpuz
commented
Apr 14, 2020
Marked this one with |
PR-URL: nodejs#31950 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Qard
commented
Apr 14, 2020
Sounds fine to me. 👍 |
`runSyncAndReturn` was removed from Node.js in nodejs/node#31950
PR-URL: nodejs#31950 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
PR-URL: nodejs#31950 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
PR-URL: #31950 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
PR-URL: #31950 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Notable Changes: * async_hooks**: * Merge `run` and `exit` methods (Andrey Pechkurov) #31950 * Prevent sync methods of async storage exiting outer context (Stephen Belanger) #31950 * vm: * Add `importModuleDynamically` option to compileFunction (Gus Caplan) #32985 New core collaborators: With this release, we welcome two new Node.js core collaborators: * Juan José Arboleda @juanarbol#32906 * Andrey Pechkurov @puzpuzpuz#32817 PR-URL: #33122
PR-URL: #31950 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
PR-URL: #31950 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Notable Changes: * async_hooks**: * Merge `run` and `exit` methods (Andrey Pechkurov) #31950 * Prevent sync methods of async storage exiting outer context (Stephen Belanger) #31950 * vm: * Add `importModuleDynamically` option to compileFunction (Gus Caplan) #32985 New core collaborators: With this release, we welcome two new Node.js core collaborators: * Juan José Arboleda @juanarbol#32906 * Andrey Pechkurov @puzpuzpuz#32817 PR-URL: #33122
Notable Changes: * async_hooks**: * Merge `run` and `exit` methods (Andrey Pechkurov) #31950 * Prevent sync methods of async storage exiting outer context (Stephen Belanger) #31950 * vm: * Add `importModuleDynamically` option to compileFunction (Gus Caplan) #32985 New core collaborators: With this release, we welcome two new Node.js core collaborators: * Juan José Arboleda @juanarbol#32906 * Andrey Pechkurov @puzpuzpuz#32817 PR-URL: #33122
kibertoad
commented
May 4, 2020
@Qard Sorry if I misunderstand something, but was this merged only to 12.x but not to 14.x? |
legendecas
commented
May 4, 2020
@kibertoada683e87 is the commit that landed on 14.x branch and is released with v14.0.0. |
The
_exitlogic is not actually necessary as explained here. This eliminates it and gives sync context runs a properAsyncResource.cc @vdeturckheim@puzpuzpuz@Flarna
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes