grpc: fix stats scope dangling lifetime in Google gRPC.#2642
Merged
dnoe merged 3 commits intoenvoyproxy:masterfrom Feb 22, 2018
Merged
grpc: fix stats scope dangling lifetime in Google gRPC.#2642dnoe merged 3 commits intoenvoyproxy:masterfrom
dnoe merged 3 commits intoenvoyproxy:masterfrom
Conversation
The scope was owned by the factory, which might disappear before the client. In this PR, we now refcount the stats scope via shared_ptr. Risk Level: Low Testing: New ADS integration test for failed connections, which is where the segfault that resulted from this bug manifested. Signed-off-by: Harvey Tuch <htuch@google.com>
dnoe
reviewed
Feb 21, 2018
| MockStubFactory stub_factory_; | ||
| const Protobuf::MethodDescriptor* method_descriptor_; | ||
| Stats::IsolatedStoreImpl stats_store_; | ||
| Stats::ScopeSharedPtr stats_store_{new Stats::IsolatedStoreImpl}; |
Contributor
There was a problem hiding this comment.
Can you use std::make_shared for this?
Signed-off-by: Harvey Tuch <htuch@google.com>
dnoe
approved these changes
Feb 22, 2018
jpsim
pushed a commit
that referenced
this pull request
Nov 28, 2022
Disable flaky TestConfig.StringAccessors util the cause of flakiness is addressed. #2641 Risk Level: Low Testing: N/A Docs Changes: N/A Release Notes: N/A Signed-off-by: Ryan Hamilton rch@google.com Signed-off-by: JP Simard <jp@jpsim.com>
jpsim
pushed a commit
that referenced
this pull request
Nov 29, 2022
Disable flaky TestConfig.StringAccessors util the cause of flakiness is addressed. #2641 Risk Level: Low Testing: N/A Docs Changes: N/A Release Notes: N/A Signed-off-by: Ryan Hamilton rch@google.com Signed-off-by: JP Simard <jp@jpsim.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The scope was owned by the factory, which might disappear before the client. In this PR, we now
refcount the stats scope via shared_ptr.
Risk Level: Low
Testing: New ADS integration test for failed connections, which is where the segfault that resulted
from this bug manifested.
Signed-off-by: Harvey Tuch htuch@google.com