-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: Separate out grpc_init into its own class #8293
grpc: Separate out grpc_init into its own class #8293
Conversation
Signed-off-by: Joshua Marantz <[email protected]>
Signed-off-by: Joshua Marantz <[email protected]>
Signed-off-by: Joshua Marantz <[email protected]>
…re no one calls grpc_init directly. Signed-off-by: Joshua Marantz <[email protected]>
Signed-off-by: Joshua Marantz <[email protected]>
Signed-off-by: Joshua Marantz <[email protected]>
Signed-off-by: Joshua Marantz <[email protected]>
…E macro rather than a static. Signed-off-by: Joshua Marantz <[email protected]>
Signed-off-by: Joshua Marantz <[email protected]>
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.
LGTM modulo minor nits. I wish we didn't need to do this, but the gRPC lib is largely opaque, so not much can be done I think.
Signed-off-by: Joshua Marantz <[email protected]>
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.
LGTM with small nit if possible. Thank you!
@@ -65,7 +66,8 @@ class MainCommonBase { | |||
const AdminRequestFn& handler); | |||
|
|||
protected: | |||
ProcessWide process_wide_; // Process-wide state setup/teardown. | |||
ProcessWide process_wide_; // Process-wide state setup/teardown (excluding grpc). | |||
Grpc::GoogleGrpcContext google_grpc_context_; |
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.
nit: is it possible for this to be stubbed when there is no Google-gRPC support compiled in? It's a little strange that we still have the context, but the actual calls inside it are compiled out?
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.
OK fair enough; can make that change. Do you want to consider merging this in first though and I will commit to cleaning it up in a follow-up, so we can de-flake CI?
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.
Sure sounds good.
* Separate out grpc init to a separate class. Signed-off-by: Joshua Marantz <[email protected]>
* Separate out grpc init to a separate class. Signed-off-by: Joshua Marantz <[email protected]>
* Separate out grpc init to a separate class. Signed-off-by: Joshua Marantz <[email protected]>
Description: Resolves memory-allocation non-determinism stemming from async activity initiated from grpc_init(). See grpc/grpc#20303 for background.
Risk Level: medium -- changes the way grpc is initialized in tests, but in prod should be the same.
Testing: //test/...
Docs Changes: n/a
Release Notes: n/a
Fixes: #8282