Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
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