http: defer reentrant execution of Parser::Execute#43369
http: defer reentrant execution of Parser::Execute#43369ShogunPanda wants to merge 6 commits intonodejs:mainfrom
Conversation
|
Review requested:
|
|
Good work! |
|
The problematic My suggestion: remove I speculate the hit won't be so bad, and can probably be fixed by doing the bookkeeping in JS land. |
|
@bnoordhuis Are you suggesting to remove that just in |
|
That threading through isn't necessary. Just set Node can short-circuit and pass data directly from libuv to the callback without going through
If I had infinite free time, I'd rewrite the parser to get rid of C++ -> JS callbacks and just return parse info. It'd get rid of so much complexity and inefficiency. |
|
Actually I was able to remove the Do you see any problem in this? |
|
@addaleax @bnoordhuis I've sent my latest version which removes |
97fbe67 to
5c2884b
Compare
|
@bnoordhuis I applied your changes (plus few additional required changes). How does it look now? |
|
Is there a reason you didn't update lib/_http_common.js? You don't need to slice anymore, or pass the start and len arguments. |
|
@bnoordhuis The answer is obvious: I forgot. X°°°D Done now! |
50144ba to
09ab6d2
Compare
bnoordhuis
left a comment
There was a problem hiding this comment.
Nice, good work!
@addaleax I'll go ahead and dismiss your review. Looks like all actionable feedback's been addressed.
|
Done! |
mcollina
left a comment
There was a problem hiding this comment.
lgtm
wow, when a PR fixes a bug and reduces code, it's doing something right.
|
Thanks sir :) |
9ed0989 to
7a827ed
Compare
|
@nodejs/http Can anybody reapprove this so I can land it? |
|
Landed in b970634 |
PR-URL: nodejs#43369 Fixes: nodejs#39671 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
Hello @ShogunPanda Thanks for your work ! |
|
@j-catania It was merged in |
|
Is there a way to help see this backported to 16.x? This bug is really biting us as we are doing file uploads, and the 18 LTS release is still ~4 months off so upgrading isn't an option for us, and that we expect surrounding infra will take a few months to add 18 support after it releases. |
@nodejs/tsc Can we do this? What is the policy about backporting? |
|
node/doc/contributing/backporting-to-release-lines.md Lines 19 to 25 in 7bf50bc |
Standard policy is:
|
|
Thanks both. |
|
If the commit lands cleanly on node/doc/contributing/backporting-to-release-lines.md Lines 11 to 17 in 7bf50bc If a backport PR is necessary, you don't need to wait two weeks for opening it, but the LTS team won't land it until it's been on a Current version for at least two weeks. |
|
I see. |
|
No, someone from |
PR-URL: nodejs/node#43369 Fixes: nodejs/node#39671 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This PR fixes an edge case in which
Parser::Executeis called within the callback of one of its events.Fixes: #39671