Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5ec1f68
Replace Stats::ScopePtr with Stats::SharedScopePtr in common/...
jmarantz Feb 28, 2022
f765218
remove most of the changes to try to get them in incrementally.
jmarantz Mar 1, 2022
c585345
Merge branch 'main' into shared-scopes-3
jmarantz Mar 1, 2022
3a4ecb5
Merge branch 'main' into shared-scopes-3
jmarantz Apr 5, 2022
3c69f0f
repro and fix stats-handler race
jmarantz Apr 16, 2022
4244cb3
format
jmarantz Apr 16, 2022
dd7c1ce
fix deadlocks
jmarantz Apr 16, 2022
63e174c
Merge branch 'main' into repro-admin-stats-crash
jmarantz Apr 16, 2022
dfcc250
minor cleanup
jmarantz Apr 16, 2022
966abe4
format
jmarantz Apr 16, 2022
fbeb031
tsan issue in test fixture.
jmarantz Apr 16, 2022
e6f0124
inline a template function to ensure it's defined.
jmarantz Apr 16, 2022
a1c3ed1
cleanup thread safety assertions in header
jmarantz Apr 16, 2022
c8c99b6
more thread annotation cleanups
jmarantz Apr 16, 2022
580e57a
final thread annotation cleanup
jmarantz Apr 16, 2022
b7ae70b
privatize the central cache object.
jmarantz Apr 16, 2022
fbc6c0f
remove superfluous comment
jmarantz Apr 16, 2022
d0464da
fix const propagation compile issue on windows
jmarantz Apr 16, 2022
52cb554
add comments & move some function definitions from h to cc
jmarantz Apr 17, 2022
a98fff4
use ranged for loop
jmarantz Apr 17, 2022
5d5f6d0
Merge branch 'repro-admin-stats-crash' into shared-scopes-3
jmarantz Apr 18, 2022
bda0d59
Merge branch 'main' into shared-scopes-3
jmarantz Apr 18, 2022
4b45c2a
Merge branch 'main' into shared-scopes-3
jmarantz Apr 18, 2022
9240e9a
back out #20855
jmarantz Apr 18, 2022
4b58edf
ScopePtr -> ScopeSharedPtr experiment
jmarantz Apr 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/common/filter/config_discovery_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class FilterConfigSubscription
Init::SharedTargetImpl init_target_;
bool started_{false};

Stats::ScopePtr scope_;
Stats::ScopeSharedPtr scope_;
ExtensionConfigDiscoveryStats stats_;

// FilterConfigProviderManagerImplBase maintains active subscriptions in a map.
Expand Down
2 changes: 1 addition & 1 deletion source/common/rds/rds_route_config_subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class RdsRouteConfigSubscription : Envoy::Config::SubscriptionCallbacks,
protected:
const std::string route_config_name_;
// This scope must outlive the subscription_ below as the subscription has derived stats.
Stats::ScopePtr scope_;
Stats::ScopeSharedPtr scope_;
Envoy::Config::SubscriptionPtr subscription_;
Server::Configuration::ServerFactoryContext& factory_context_;

Expand Down
8 changes: 4 additions & 4 deletions source/common/router/config_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class VirtualHostImpl : public VirtualHost, Logger::Loggable<Logger::Id::router>
struct VirtualClusterBase : public VirtualCluster {
public:
VirtualClusterBase(const absl::optional<std::string>& name, Stats::StatName stat_name,
Stats::ScopePtr&& scope, const VirtualClusterStatNames& stat_names)
Stats::ScopeSharedPtr&& scope, const VirtualClusterStatNames& stat_names)
: name_(name), stat_name_(stat_name), scope_(std::move(scope)),
stats_(generateStats(*scope_, stat_names)) {}

Expand All @@ -252,7 +252,7 @@ class VirtualHostImpl : public VirtualHost, Logger::Loggable<Logger::Id::router>
private:
const absl::optional<std::string> name_;
const Stats::StatName stat_name_;
Stats::ScopePtr scope_;
Stats::ScopeSharedPtr scope_;
mutable VirtualClusterStats stats_;
};

Expand All @@ -271,7 +271,7 @@ class VirtualHostImpl : public VirtualHost, Logger::Loggable<Logger::Id::router>
static const std::shared_ptr<const SslRedirectRoute> SSL_REDIRECT_ROUTE;

const Stats::StatNameManagedStorage stat_name_storage_;
Stats::ScopePtr vcluster_scope_;
Stats::ScopeSharedPtr vcluster_scope_;
std::vector<RouteEntryImplBaseConstSharedPtr> routes_;
std::vector<VirtualClusterEntry> virtual_clusters_;
SslRequirements ssl_requirements_;
Expand Down Expand Up @@ -1191,7 +1191,7 @@ class RouteMatcher {
const WildcardVirtualHosts& wildcard_virtual_hosts,
SubstringFunction substring_function) const;

Stats::ScopePtr vhost_scope_;
Stats::ScopeSharedPtr vhost_scope_;
absl::node_hash_map<std::string, VirtualHostSharedPtr> virtual_hosts_;
// std::greater as a minor optimization to iterate from more to less specific
//
Expand Down
2 changes: 1 addition & 1 deletion source/common/router/scoped_rds.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class ScopedRdsConfigSubscription
Server::Configuration::ServerFactoryContext& factory_context_;
const std::string name_;
// Stats must outlive subscription.
Stats::ScopePtr scope_;
Stats::ScopeSharedPtr scope_;
ScopedRdsStats stats_;
Envoy::Config::SubscriptionPtr subscription_;
const envoy::extensions::filters::network::http_connection_manager::v3::ScopedRoutes::
Expand Down
2 changes: 1 addition & 1 deletion source/common/router/vhds.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class VhdsSubscription : Envoy::Config::SubscriptionBase<envoy::config::route::v
const EnvoyException* e) override;

RouteConfigUpdatePtr& config_update_info_;
Stats::ScopePtr scope_;
Stats::ScopeSharedPtr scope_;
VhdsStats stats_;
Envoy::Config::SubscriptionPtr subscription_;
Init::TargetImpl init_target_;
Expand Down
2 changes: 1 addition & 1 deletion source/common/runtime/runtime_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ struct RtdsSubscription : Envoy::Config::SubscriptionBase<envoy::service::runtim
LoaderImpl& parent_;
const envoy::config::core::v3::ConfigSource config_source_;
Stats::Store& store_;
Stats::ScopePtr stats_scope_;
Stats::ScopeSharedPtr stats_scope_;
Config::SubscriptionPtr subscription_;
std::string resource_name_;
Init::TargetImpl init_target_;
Expand Down
2 changes: 1 addition & 1 deletion source/common/secret/sds_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class SdsApi : public Envoy::Config::SubscriptionBase<
void onWatchUpdate();
SdsApiStats generateStats(Stats::Scope& scope);

Stats::ScopePtr scope_;
Stats::ScopeSharedPtr scope_;
SdsApiStats sds_api_stats_;

const envoy::config::core::v3::ConfigSource sds_config_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class AppleDnsResolverImpl : public DnsResolver, protected Logger::Loggable<Logg
Event::Dispatcher& dispatcher_;
Event::TimerPtr initialize_failure_timer_;
BackOffStrategyPtr backoff_strategy_;
Stats::ScopePtr scope_;
Stats::ScopeSharedPtr scope_;
AppleDnsResolverStats stats_;
};

Expand Down
2 changes: 1 addition & 1 deletion test/common/stats/utility_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ DEFINE_FUZZER(const uint8_t* buf, size_t len) {
std::unique_ptr<Stats::IsolatedStoreImpl> store =
std::make_unique<Stats::IsolatedStoreImpl>(symbol_table);
Stats::StatNamePool pool(symbol_table);
Stats::ScopePtr scope = store->createScope(provider.ConsumeRandomLengthString(max_len));
Stats::ScopeSharedPtr scope = store->createScope(provider.ConsumeRandomLengthString(max_len));
Stats::ElementVec ele_vec;
Stats::StatNameVec sn_vec;
Stats::StatNameTagVector tags;
Expand Down