Skip to content
Merged
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
18 changes: 8 additions & 10 deletions source/common/router/scoped_rds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,19 @@ void ScopedRdsConfigSubscription::RdsRouteConfigProviderHelper::maybeInitRdsConf

// Create a init_manager to create a rds provider.
// No transitive warming dependency here because only on demand update reach this point.
std::unique_ptr<Init::ManagerImpl> srds_init_mgr =
std::make_unique<Init::ManagerImpl>(fmt::format("SRDS on demand init manager."));
std::unique_ptr<Cleanup> srds_initialization_continuation =
std::make_unique<Cleanup>([this, &srds_init_mgr] {
Init::WatcherImpl noop_watcher(
fmt::format("SRDS on demand ConfigUpdate watcher: {}", scope_name_),
[]() { /*Do nothing.*/ });
srds_init_mgr->initialize(noop_watcher);
});
Init::ManagerImpl srds_init_mgr("SRDS on demand init manager.");
Cleanup srds_initialization_continuation([this, &srds_init_mgr] {
Init::WatcherImpl noop_watcher(
fmt::format("SRDS on demand ConfigUpdate watcher: {}", scope_name_),
[]() { /*Do nothing.*/ });
srds_init_mgr.initialize(noop_watcher);
});
// Create route provider.
envoy::extensions::filters::network::http_connection_manager::v3::Rds rds;
rds.mutable_config_source()->MergeFrom(parent_.rds_config_source_);
rds.set_route_config_name(
parent_.scoped_route_map_[scope_name_]->configProto().route_configuration_name());
initRdsConfigProvider(rds, *srds_init_mgr);
initRdsConfigProvider(rds, srds_init_mgr);
ENVOY_LOG(debug, fmt::format("Scope on demand update: {}", scope_name_));
// If RouteConfiguration hasn't been initialized, routeConfig() return a shared_ptr to
// NullConfigImpl. The name of NullConfigImpl is an empty string.
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/conn_pool_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ template <typename KEY_TYPE, typename POOL_TYPE> class ConnPoolMap {
/**
* @return true if the pools are empty.
*/
size_t empty() const;
bool empty() const;

/**
* Destroys all mapped pools.
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/conn_pool_map_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ size_t ConnPoolMap<KEY_TYPE, POOL_TYPE>::size() const {
}

template <typename KEY_TYPE, typename POOL_TYPE>
size_t ConnPoolMap<KEY_TYPE, POOL_TYPE>::empty() const {
bool ConnPoolMap<KEY_TYPE, POOL_TYPE>::empty() const {
return active_pools_.empty();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class GrpcAccessLogger : public Detail::GrpcAccessLogger<HttpLogProto, TcpLogPro
flush_timer_->enableTimer(buffer_flush_interval_msec_);
}

void log(HttpLogProto&& entry) {
void log(HttpLogProto&& entry) override {
if (!canLogMore()) {
return;
}
Expand All @@ -183,7 +183,7 @@ class GrpcAccessLogger : public Detail::GrpcAccessLogger<HttpLogProto, TcpLogPro
}
}

void log(TcpLogProto&& entry) {
void log(TcpLogProto&& entry) override {
approximate_message_size_bytes_ += entry.ByteSizeLong();
addEntry(std::move(entry));
if (approximate_message_size_bytes_ >= max_buffer_size_bytes_) {
Expand Down