Skip to content

grpc: Separate out grpc_init into its own class#8293

Merged
jmarantz merged 10 commits intoenvoyproxy:masterfrom
jmarantz:deflake-stats-mem-tests
Sep 23, 2019
Merged

grpc: Separate out grpc_init into its own class#8293
jmarantz merged 10 commits intoenvoyproxy:masterfrom
jmarantz:deflake-stats-mem-tests

Conversation

@jmarantz
Copy link
Copy Markdown
Contributor

@jmarantz jmarantz commented Sep 19, 2019

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

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz jmarantz changed the title Separate out grpc init to a separate class. grpc: Separate out grpc_init into its own class Sep 19, 2019
…re no one calls grpc_init directly.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@lizan lizan added the waiting label Sep 19, 2019
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…E macro rather than a static.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Copy link
Copy Markdown
Member

@htuch htuch left a 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 <jmarantz@google.com>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a 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!

protected:
ProcessWide process_wide_; // Process-wide state setup/teardown.
ProcessWide process_wide_; // Process-wide state setup/teardown (excluding grpc).
Grpc::GoogleGrpcContext google_grpc_context_;
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor Author

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure sounds good.

@jmarantz jmarantz merged commit 2fd5fe6 into envoyproxy:master Sep 23, 2019
@jmarantz jmarantz deleted the deflake-stats-mem-tests branch September 23, 2019 18:51
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Sep 24, 2019
* Separate out grpc init to a separate class.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Oct 4, 2019
* Separate out grpc init to a separate class.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Oct 4, 2019
* Separate out grpc init to a separate class.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
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.

StatsThreadLocalStoreTestNoFixture.MemoryWithoutTlsFakeSymbolTable flaky?

4 participants