| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Ping @nodejs/http2 ... this should be ready for review. It's a rather large and complicated set of changes that refactors the shutdown, destroy and cleanup logic in Http2Stream and Http2Session. It's not going to be trivial to review. @mcollina ... Please take a good careful look at this. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Trying again: https://ci.nodejs.org/job/node-test-pull-request/11895/ |
Sorry, something went wrong.
|
Ok, there's definitely still quite a bit of wonkiness in here that I'll have to chase down. |
Sorry, something went wrong.
Sorry, something went wrong.
|
I'll start reviewing this over the next few days. Might take a little while to get through. I would also like to run this against the test suite I have for express & related middleware. |
Sorry, something went wrong.
|
@apapirovski ... @mcollina and I discussed this a bit today and worked through a few more changes that need to be made (which will actually undo some of the changes made in this PR so far...). I'm working on those now and should hopefully have it complete by end of the day tomorrow at the latest. |
Sorry, something went wrong.
|
@jasnell No worries. Keep me posted, happy to start reviewing whenever it's ready. |
Sorry, something went wrong.
There was a problem hiding this comment.
Very good progress, I hope I reviewed all of it. Let me know if I missed some critical changes.
Sorry, something went wrong.
There was a problem hiding this comment.
is this used at all?
Sorry, something went wrong.
There was a problem hiding this comment.
are we swallowing an error here? Can we destroy those in parallel safely?
Sorry, something went wrong.
There was a problem hiding this comment.
can you name this function?
Sorry, something went wrong.
There was a problem hiding this comment.
This is a lot of code that is kind of hot. This should live in a top level function somewhere. Can we remove the need to wrap it in a closure?
Sorry, something went wrong.
There was a problem hiding this comment.
why do we need all these arguments? I would really prefer we did a .destroy(err, callbak), where err is an instance of Error. It seems this signature is one for a more internal function.
Sorry, something went wrong.
There was a problem hiding this comment.
We don't need the lastStreamIDand opaqueData here.. I've removed those. The code is required because we have to know which error code to send in the final GOAWAY frame and that cannot always be determined automatically.
Sorry, something went wrong.
There was a problem hiding this comment.
this should not be needed, why it is?
Sorry, something went wrong.
There was a problem hiding this comment.
same as above :-)
Sorry, something went wrong.
There was a problem hiding this comment.
Can this be close(callback)? I would prefer to not expose NGHTTP2 error codes. For errors, we have destroy().
Sorry, something went wrong.
There was a problem hiding this comment.
This is not an NGHTTP2 error code, it's an HTTP2 RST_STREAM error code. An RST_STREAM is used to close the stream here so we need to know what code to use. There are legitimate cases where the user might specify something other than NO_ERROR without using destroy(err)
Sorry, something went wrong.
There was a problem hiding this comment.
why this can happen? I think a comment is needed
Sorry, something went wrong.
There was a problem hiding this comment.
silently ignoring things is not nice, I'd do the error here.
Sorry, something went wrong.
There was a problem hiding this comment.
can you add a comment explaining this condition?
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
@jasnell Can you give an overview over what’s going to happen with this PR? Is it (nearly) ready? :) And maybe, are the C++ bits independent enough from the rest that they could be split off into their own PR? I’ll continue working on StreamBase after #17564 and I think that might be nice to have this landed before that… |
Sorry, something went wrong.
|
This pr is nearly there. Working on getting one final test working then will be squashing and reorganizing the commits down. Unfortunately, no, the c++ bits cannot be spun off into their own pr. The goal is to get this finished up today. |
Sorry, something went wrong.
There was a problem hiding this comment.
can you replace err as null?
Sorry, something went wrong.
|
This will need to eventually get in to 8.x
…On Feb 25, 2018 13:07, "Anna Henningsen" ***@***.***> wrote:
@jasnell <https://github.com/jasnell> I don’t know if you were planning
on backporting this change to v8.x, but it appears to be behind the bug
fixed in #18987 <#18987>. I’ve added
dont-land-on-v8.x for now, let me know if that’s not a good idea.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17406 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAa2eUPJA56H9aqwhSkOhMgPYYAvz1M0ks5tYcuEgaJpZM4QxUEF>
.
|
Sorry, something went wrong.
|
Just wondering, has there been any progress in backporting this? If not, I do see that the dont-land-on-v8.x label is still there... should it be removed so that we don't accidentally gloss over the issue? |
Sorry, something went wrong.
Yes definitely.
@addaleax so are we okay to backport this along with #18987? |
Sorry, something went wrong.
|
All of the http2 commits that have landed since this one are held up from being backported until this one lands so the sooner it can be done the better. :-) |
Sorry, something went wrong.
|
Here is a list of all http tagged commits that are not on 8.x I'm seeing if I can get a backport working for the lot https://gist.github.com/MylesBorins/372674e5b7f5370ccf03445d819afa90 |
Sorry, something went wrong.
PR-URL: nodejs#17406 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
PR-URL: nodejs#17406 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> This is a significant cleanup and refactoring of the cleanup/close/destroy logic for Http2Stream and Http2Session. There are significant changes here in the timing and ordering of cleanup logic, JS apis. and various related necessary edits.
| Back | FazBrowse Home | New Git URL |
This is a significant refactoring of the close/destroy flow and API for Http2Stream and Http2Session. There is quite a bit more to do in here, it's a bit slow going because the flow is rather complex and I'm trying not to break too much as I go.
There are several important bits:
Previously, the destroy operations for both Http2Session and Http2Stream were executed over multiple nextTick and setImmediate hops. Now the objects are unusable immediately when calling destroy() and we're using env->SetImmediate() to handle the need to defer final cleanup (cc @addaleax)
This reworks the destroy and error handling flow between the Http2Session and socket and eliminates the 'socketError' event. Errors occurring on the socket are forwarded to the error event on the associated Http2Session. On the server, those are forwarded to the 'sessionError' event.
Http2Stream.prototype.rstStream() has been renamed to Http2Stream.prototype.close() and the various rstWith.... aliases have been removed.
An improved Http2Session.prototype.close() has been implemented, allowing better API symmetry.
There are still a few more todo's that need to be handled here. Specifically, proper handling of last stream ID on a goaway frame, but this is already a sizable chunk of work. Let's get this reviewed and landed and I'll keep pushing forward.
/cc @nodejs/http2
Checklist
Affected core subsystem(s)
http2