Skip to content
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

grpc-js: Unregister socket from channelz when closing transport #2394

Merged

Conversation

murgatroid99
Copy link
Member

This fixes #2393. Manual testing shows that without this change, after a channel is closed, the channelz registry reference keeps the transport alive, and that in turn keeps the subchannel alive.

@Matt-Esch
Copy link

Does the grpc spec specify that the default configuration should be to enable this? I was fairly convinced something related to channelz was leaking when I reported the memory issues. I disabled it just to reduce the memory overhead of having it there anyway, I wonder if it would be best to make this an opt in feature? I also think the same about retries, unless I'm mistaken it looked as if I was opted into retries by upgrading the version. That change is a bit more problematic.

@murgatroid99
Copy link
Member Author

The spec doesn't say anything about enabling or disabling data collection, but the corresponding channel option in the C core defaults to enabled. At this point, we can't change it because that would potentially break any code that is using it. And once the leak is fixed, I don't think it would be enough of an issue that we would want to do that anyway.

The retry functionality that is enabled by default is transparent retries, which are specified that way.

@murgatroid99 murgatroid99 merged commit 114c87c into grpc:@grpc/grpc-js@1.8.x Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants