Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
efd2b04
Introduce creation_time field into host description
Sep 22, 2020
6d9006a
Merge remote-tracking branch 'origin/master'
Oct 29, 2020
ff380e9
Clean up extensive formatting
Nov 3, 2020
e6a2501
Clean up local dev settings
Nov 3, 2020
da2ddd9
Merge remote-tracking branch 'origin/master'
Nov 3, 2020
e26fe9e
Remove more extensive formatting
Nov 4, 2020
9b9235d
Fix fuzz test
Nov 4, 2020
33f4216
Merge remote-tracking branch 'origin/master'
Nov 4, 2020
e727e05
Fix format
Nov 5, 2020
dfaddf2
Fix more tests
Nov 5, 2020
2a67a52
Fix test
Nov 5, 2020
a158105
Fix test
Nov 5, 2020
0047c15
Fix test
Nov 6, 2020
5703a22
fix more compilation errors
Nov 6, 2020
b5a3039
Merge remote-tracking branch 'origin/master'
Nov 6, 2020
f6fd36e
Fix new test
Nov 6, 2020
98141c0
Fix redis test
Nov 9, 2020
36a220c
fix rocketmq tests
Nov 9, 2020
77d1622
Fix statsd test
Nov 10, 2020
6372f04
Remove simulated time system from base integration test
Nov 10, 2020
81946d8
Merge remote-tracking branch 'origin/master'
Nov 10, 2020
6bbe8ea
fix format...
Nov 11, 2020
8a96d2c
fix proxy filter IT
Nov 11, 2020
7c3f2f5
fix seg fault in redis proxy filter
Nov 11, 2020
9816873
fix admission control test
Nov 11, 2020
78dc088
Merge remote-tracking branch 'origin/master'
Nov 11, 2020
a471591
fix health check test
Nov 11, 2020
d35b978
Update host utility test
Nov 11, 2020
6450f24
Clang memory leak fix?
Nov 16, 2020
5d9234f
Revert tries of memory leak fixing
Nov 16, 2020
be052a3
Merge remote-tracking branch 'origin/master'
Nov 17, 2020
a6127ee
fix memory allocation in fuzz tests
Nov 18, 2020
c59a56c
Remove no longer needed changes
Nov 18, 2020
2c68102
remove stale comment
Nov 18, 2020
edabd3a
this is last memory leak
Nov 18, 2020
9ed491f
Merge remote-tracking branch 'origin/master'
Nov 19, 2020
1536515
fix http timeout integration test
Nov 19, 2020
f089c01
Apply review comments
Nov 23, 2020
84add66
Apply review comments
Nov 23, 2020
925396c
fix
Nov 23, 2020
8a11a73
Merge remote-tracking branch 'origin/master'
Nov 24, 2020
8167d28
fix
Nov 24, 2020
f4124cd
fix
Nov 24, 2020
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
6 changes: 6 additions & 0 deletions include/envoy/upstream/host_description.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <memory>
#include <string>

#include "envoy/common/time.h"
#include "envoy/config/core/v3/base.pb.h"
#include "envoy/network/address.h"
#include "envoy/network/transport_socket.h"
Expand Down Expand Up @@ -148,6 +149,11 @@ class HostDescription {
* Set the current priority.
*/
virtual void priority(uint32_t) PURE;

/**
* @return timestamp in milliseconds of when host was created.
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:

Suggested change
* @return timestamp in milliseconds of when host was created.
* @return timestamp when host was created.

*/
virtual MonotonicTime creationTime() const PURE;
};

using HostDescriptionConstSharedPtr = std::shared_ptr<const HostDescription>;
Expand Down
4 changes: 2 additions & 2 deletions source/common/upstream/eds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ EdsClusterImpl::EdsClusterImpl(
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
: BaseDynamicClusterImpl(cluster, runtime, factory_context, std::move(stats_scope),
added_via_api),
added_via_api, factory_context.dispatcher().timeSource()),
Envoy::Config::SubscriptionBase<envoy::config::endpoint::v3::ClusterLoadAssignment>(
cluster.eds_cluster_config().eds_config().resource_api_version(),
factory_context.messageValidationVisitor(), "cluster_name"),
Expand Down Expand Up @@ -58,7 +58,7 @@ void EdsClusterImpl::BatchUpdateHelper::batchUpdate(PrioritySet::HostUpdateCb& h
priority_state_manager.registerHostForPriority(
lb_endpoint.endpoint().hostname(),
parent_.resolveProtoAddress(lb_endpoint.endpoint().address()), locality_lb_endpoint,
lb_endpoint);
lb_endpoint, parent_.time_source_);
}
}

Expand Down
7 changes: 4 additions & 3 deletions source/common/upstream/health_discovery_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ HdsCluster::HdsCluster(Server::Admin& admin, Runtime::Loader& runtime,
ProtobufMessage::ValidationVisitor& validation_visitor, Api::Api& api)
: runtime_(runtime), cluster_(std::move(cluster)), bind_config_(bind_config), stats_(stats),
ssl_context_manager_(ssl_context_manager), added_via_api_(added_via_api),
hosts_(new HostVector()), validation_visitor_(validation_visitor) {
hosts_(new HostVector()), validation_visitor_(validation_visitor),
time_source_(dispatcher.timeSource()) {
ENVOY_LOG(debug, "Creating an HdsCluster");
priority_set_.getOrCreateHostSet(0);
// Set initial hashes for possible delta updates.
Expand Down Expand Up @@ -377,7 +378,7 @@ HdsCluster::HdsCluster(Server::Admin& admin, Runtime::Loader& runtime,
info_, "", Network::Address::resolveProtoAddress(host.endpoint().address()), nullptr, 1,
locality_endpoints.locality(),
envoy::config::endpoint::v3::Endpoint::HealthCheckConfig().default_instance(), 0,
envoy::config::core::v3::UNKNOWN);
envoy::config::core::v3::UNKNOWN, time_source_);
// Add this host/endpoint pointer to our flat list of endpoints for health checking.
hosts_->push_back(endpoint);
// Add this host/endpoint pointer to our structured list by locality so results can be
Expand Down Expand Up @@ -489,7 +490,7 @@ void HdsCluster::updateHosts(
info_, "", Network::Address::resolveProtoAddress(endpoint.endpoint().address()),
nullptr, 1, endpoints.locality(),
envoy::config::endpoint::v3::Endpoint::HealthCheckConfig().default_instance(), 0,
envoy::config::core::v3::UNKNOWN);
envoy::config::core::v3::UNKNOWN, time_source_);

// Set the initial health status as in HdsCluster::initialize.
host->healthFlagSet(Host::HealthFlag::FAILED_ACTIVE_HC);
Expand Down
1 change: 1 addition & 0 deletions source/common/upstream/health_discovery_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class HdsCluster : public Cluster, Logger::Loggable<Logger::Id::upstream> {
std::vector<Upstream::HealthCheckerSharedPtr> health_checkers_;
HealthCheckerMap health_checkers_map_;
ProtobufMessage::ValidationVisitor& validation_visitor_;
TimeSource& time_source_;

void updateHealthchecks(
const Protobuf::RepeatedPtrField<envoy::config::core::v3::HealthCheck>& health_checks,
Expand Down
8 changes: 5 additions & 3 deletions source/common/upstream/logical_dns_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ LogicalDnsCluster::LogicalDnsCluster(
Network::DnsResolverSharedPtr dns_resolver,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
: ClusterImplBase(cluster, runtime, factory_context, std::move(stats_scope), added_via_api),
: ClusterImplBase(cluster, runtime, factory_context, std::move(stats_scope), added_via_api,
factory_context.dispatcher().timeSource()),
dns_resolver_(dns_resolver),
dns_refresh_rate_ms_(
std::chrono::milliseconds(PROTOBUF_GET_MS_OR_DEFAULT(cluster, dns_refresh_rate, 5000))),
Expand Down Expand Up @@ -121,8 +122,9 @@ void LogicalDnsCluster::startResolve() {
Network::Utility::portFromTcpUrl(dns_url_));

if (!logical_host_) {
logical_host_ = std::make_shared<LogicalHost>(
info_, hostname_, new_address, localityLbEndpoint(), lbEndpoint(), nullptr);
logical_host_ =
std::make_shared<LogicalHost>(info_, hostname_, new_address, localityLbEndpoint(),
lbEndpoint(), nullptr, time_source_);

const auto& locality_lb_endpoint = localityLbEndpoint();
PriorityStateManager priority_state_manager(*this, local_info_, nullptr);
Expand Down
7 changes: 5 additions & 2 deletions source/common/upstream/logical_host.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "envoy/common/time.h"
#include "envoy/config/core/v3/base.pb.h"
#include "envoy/config/endpoint/v3/endpoint_components.pb.h"

Expand All @@ -18,13 +19,14 @@ class LogicalHost : public HostImpl {
const Network::Address::InstanceConstSharedPtr& address,
const envoy::config::endpoint::v3::LocalityLbEndpoints& locality_lb_endpoint,
const envoy::config::endpoint::v3::LbEndpoint& lb_endpoint,
const Network::TransportSocketOptionsSharedPtr& override_transport_socket_options)
const Network::TransportSocketOptionsSharedPtr& override_transport_socket_options,
TimeSource& time_source)
: HostImpl(cluster, hostname, address,
// TODO(zyfjeff): Created through metadata shared pool
std::make_shared<const envoy::config::core::v3::Metadata>(lb_endpoint.metadata()),
lb_endpoint.load_balancing_weight().value(), locality_lb_endpoint.locality(),
lb_endpoint.endpoint().health_check_config(), locality_lb_endpoint.priority(),
lb_endpoint.health_status()),
lb_endpoint.health_status(), time_source),
override_transport_socket_options_(override_transport_socket_options) {}

// Set the new address. Updates are typically rare so a R/W lock is used for address updates.
Expand Down Expand Up @@ -104,6 +106,7 @@ class RealHostDescription : public HostDescription {
// checking.
NOT_IMPLEMENTED_GCOVR_EXCL_LINE;
}
MonotonicTime creationTime() const override { return logical_host_->creationTime(); }
uint32_t priority() const override { return logical_host_->priority(); }
void priority(uint32_t) override { NOT_IMPLEMENTED_GCOVR_EXCL_LINE; }

Expand Down
5 changes: 3 additions & 2 deletions source/common/upstream/original_dst_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ HostConstSharedPtr OriginalDstCluster::LoadBalancer::chooseHost(LoadBalancerCont
info, info->name() + dst_addr.asString(), std::move(host_ip_port), nullptr, 1,
envoy::config::core::v3::Locality().default_instance(),
envoy::config::endpoint::v3::Endpoint::HealthCheckConfig().default_instance(), 0,
envoy::config::core::v3::UNKNOWN));
envoy::config::core::v3::UNKNOWN, parent_->time_source_));
ENVOY_LOG(debug, "Created host {}.", host->address()->asString());

// Tell the cluster about the new host
Expand Down Expand Up @@ -107,7 +107,8 @@ OriginalDstCluster::OriginalDstCluster(
const envoy::config::cluster::v3::Cluster& config, Runtime::Loader& runtime,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
: ClusterImplBase(config, runtime, factory_context, std::move(stats_scope), added_via_api),
: ClusterImplBase(config, runtime, factory_context, std::move(stats_scope), added_via_api,
factory_context.dispatcher().timeSource()),
dispatcher_(factory_context.dispatcher()),
cleanup_interval_ms_(
std::chrono::milliseconds(PROTOBUF_GET_MS_OR_DEFAULT(config, cleanup_interval, 5000))),
Expand Down
7 changes: 5 additions & 2 deletions source/common/upstream/static_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ StaticClusterImpl::StaticClusterImpl(
const envoy::config::cluster::v3::Cluster& cluster, Runtime::Loader& runtime,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
: ClusterImplBase(cluster, runtime, factory_context, std::move(stats_scope), added_via_api),
: ClusterImplBase(cluster, runtime, factory_context, std::move(stats_scope), added_via_api,
factory_context.dispatcher().timeSource()),
priority_state_manager_(
new PriorityStateManager(*this, factory_context.localInfo(), nullptr)) {
// TODO(dio): Use by-reference when cluster.hosts() is removed.
Expand All @@ -23,13 +24,15 @@ StaticClusterImpl::StaticClusterImpl(
overprovisioning_factor_ = PROTOBUF_GET_WRAPPED_OR_DEFAULT(
cluster_load_assignment.policy(), overprovisioning_factor, kDefaultOverProvisioningFactor);

Event::Dispatcher& dispatcher = factory_context.dispatcher();

for (const auto& locality_lb_endpoint : cluster_load_assignment.endpoints()) {
validateEndpointsForZoneAwareRouting(locality_lb_endpoint);
priority_state_manager_->initializePriorityFor(locality_lb_endpoint);
for (const auto& lb_endpoint : locality_lb_endpoint.lb_endpoints()) {
priority_state_manager_->registerHostForPriority(
lb_endpoint.endpoint().hostname(), resolveProtoAddress(lb_endpoint.endpoint().address()),
locality_lb_endpoint, lb_endpoint);
locality_lb_endpoint, lb_endpoint, dispatcher.timeSource());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions source/common/upstream/strict_dns_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ StrictDnsClusterImpl::StrictDnsClusterImpl(
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
: BaseDynamicClusterImpl(cluster, runtime, factory_context, std::move(stats_scope),
added_via_api),
added_via_api, factory_context.dispatcher().timeSource()),
local_info_(factory_context.localInfo()), dns_resolver_(dns_resolver),
dns_refresh_rate_ms_(
std::chrono::milliseconds(PROTOBUF_GET_MS_OR_DEFAULT(cluster, dns_refresh_rate, 5000))),
Expand Down Expand Up @@ -134,7 +134,7 @@ void StrictDnsClusterImpl::ResolveTarget::startResolve() {
std::make_shared<const envoy::config::core::v3::Metadata>(lb_endpoint_.metadata()),
lb_endpoint_.load_balancing_weight().value(), locality_lb_endpoint_.locality(),
lb_endpoint_.endpoint().health_check_config(), locality_lb_endpoint_.priority(),
lb_endpoint_.health_status()));
lb_endpoint_.health_status(), parent_.time_source_));

ttl_refresh_rate = min(ttl_refresh_rate, resp.ttl_);
}
Expand Down
12 changes: 7 additions & 5 deletions source/common/upstream/upstream_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ HostDescriptionImpl::HostDescriptionImpl(
Network::Address::InstanceConstSharedPtr dest_address, MetadataConstSharedPtr metadata,
const envoy::config::core::v3::Locality& locality,
const envoy::config::endpoint::v3::Endpoint::HealthCheckConfig& health_check_config,
uint32_t priority)
uint32_t priority, TimeSource& time_source)
: cluster_(cluster), hostname_(hostname),
health_checks_hostname_(health_check_config.hostname()), address_(dest_address),
canary_(Config::Metadata::metadataValue(metadata.get(),
Expand All @@ -264,7 +264,8 @@ HostDescriptionImpl::HostDescriptionImpl(
metadata_(metadata), locality_(locality),
locality_zone_stat_name_(locality.zone(), cluster->statsScope().symbolTable()),
priority_(priority),
socket_factory_(resolveTransportSocketFactory(dest_address, metadata_.get())) {
socket_factory_(resolveTransportSocketFactory(dest_address, metadata_.get())),
creation_time_(time_source.monotonicTime()) {
if (health_check_config.port_value() != 0 && dest_address->type() != Network::Address::Type::Ip) {
// Setting the health check port to non-0 only works for IP-type addresses. Setting the port
// for a pipe address is a misconfiguration. Throw an exception.
Expand Down Expand Up @@ -889,9 +890,10 @@ ClusterInfoImpl::upstreamHttpProtocol(absl::optional<Http::Protocol> downstream_
ClusterImplBase::ClusterImplBase(
const envoy::config::cluster::v3::Cluster& cluster, Runtime::Loader& runtime,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
Stats::ScopePtr&& stats_scope, bool added_via_api, TimeSource& time_source)
: init_manager_(fmt::format("Cluster {}", cluster.name())),
init_watcher_("ClusterImplBase", [this]() { onInitDone(); }), runtime_(runtime),
time_source_(time_source),
local_cluster_(factory_context.clusterManager().localClusterName().value_or("") ==
cluster.name()),
const_metadata_shared_pool_(Config::Metadata::getConstMetadataSharedPool(
Expand Down Expand Up @@ -1234,14 +1236,14 @@ void PriorityStateManager::initializePriorityFor(
void PriorityStateManager::registerHostForPriority(
const std::string& hostname, Network::Address::InstanceConstSharedPtr address,
const envoy::config::endpoint::v3::LocalityLbEndpoints& locality_lb_endpoint,
const envoy::config::endpoint::v3::LbEndpoint& lb_endpoint) {
const envoy::config::endpoint::v3::LbEndpoint& lb_endpoint, TimeSource& time_source) {
auto metadata = lb_endpoint.has_metadata()
? parent_.constMetadataSharedPool()->getObject(lb_endpoint.metadata())
: nullptr;
const HostSharedPtr host(new HostImpl(
parent_.info(), hostname, address, metadata, lb_endpoint.load_balancing_weight().value(),
locality_lb_endpoint.locality(), lb_endpoint.endpoint().health_check_config(),
locality_lb_endpoint.priority(), lb_endpoint.health_status()));
locality_lb_endpoint.priority(), lb_endpoint.health_status(), time_source));
registerHostForPriority(host, locality_lb_endpoint);
}

Expand Down
15 changes: 10 additions & 5 deletions source/common/upstream/upstream_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <utility>
#include <vector>

#include "envoy/common/time.h"
#include "envoy/config/cluster/v3/cluster.pb.h"
#include "envoy/config/core/v3/address.pb.h"
#include "envoy/config/core/v3/base.pb.h"
Expand Down Expand Up @@ -80,7 +81,7 @@ class HostDescriptionImpl : virtual public HostDescription,
Network::Address::InstanceConstSharedPtr dest_address, MetadataConstSharedPtr metadata,
const envoy::config::core::v3::Locality& locality,
const envoy::config::endpoint::v3::Endpoint::HealthCheckConfig& health_check_config,
uint32_t priority);
uint32_t priority, TimeSource& time_source);

Network::TransportSocketFactory& transportSocketFactory() const override {
return socket_factory_;
Expand Down Expand Up @@ -139,6 +140,7 @@ class HostDescriptionImpl : virtual public HostDescription,
Network::TransportSocketFactory&
resolveTransportSocketFactory(const Network::Address::InstanceConstSharedPtr& dest_address,
const envoy::config::core::v3::Metadata* metadata) const;
MonotonicTime creationTime() const override { return creation_time_; }

protected:
ClusterInfoConstSharedPtr cluster_;
Expand All @@ -156,6 +158,7 @@ class HostDescriptionImpl : virtual public HostDescription,
HealthCheckHostMonitorPtr health_checker_;
std::atomic<uint32_t> priority_;
Network::TransportSocketFactory& socket_factory_;
const MonotonicTime creation_time_;
};

/**
Expand All @@ -169,9 +172,10 @@ class HostImpl : public HostDescriptionImpl,
Network::Address::InstanceConstSharedPtr address, MetadataConstSharedPtr metadata,
uint32_t initial_weight, const envoy::config::core::v3::Locality& locality,
const envoy::config::endpoint::v3::Endpoint::HealthCheckConfig& health_check_config,
uint32_t priority, const envoy::config::core::v3::HealthStatus health_status)
uint32_t priority, const envoy::config::core::v3::HealthStatus health_status,
TimeSource& time_source)
: HostDescriptionImpl(cluster, hostname, address, metadata, locality, health_check_config,
priority),
priority, time_source),
used_(true) {
setEdsHealthFlag(health_status);
HostImpl::weight(initial_weight);
Expand Down Expand Up @@ -772,7 +776,7 @@ class ClusterImplBase : public Cluster, protected Logger::Loggable<Logger::Id::u
protected:
ClusterImplBase(const envoy::config::cluster::v3::Cluster& cluster, Runtime::Loader& runtime,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api);
Stats::ScopePtr&& stats_scope, bool added_via_api, TimeSource& time_source);

/**
* Overridden by every concrete cluster. The cluster should do whatever pre-init is needed. E.g.,
Expand Down Expand Up @@ -812,6 +816,7 @@ class ClusterImplBase : public Cluster, protected Logger::Loggable<Logger::Id::u
Outlier::DetectorSharedPtr outlier_detector_;

protected:
TimeSource& time_source_;
PrioritySetImpl priority_set_;

void validateEndpointsForZoneAwareRouting(
Expand Down Expand Up @@ -852,7 +857,7 @@ class PriorityStateManager : protected Logger::Loggable<Logger::Id::upstream> {
void registerHostForPriority(
const std::string& hostname, Network::Address::InstanceConstSharedPtr address,
const envoy::config::endpoint::v3::LocalityLbEndpoints& locality_lb_endpoint,
const envoy::config::endpoint::v3::LbEndpoint& lb_endpoint);
const envoy::config::endpoint::v3::LbEndpoint& lb_endpoint, TimeSource& time_source);

void registerHostForPriority(
const HostSharedPtr& host,
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/clusters/aggregate/cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Cluster::Cluster(const envoy::config::cluster::v3::Cluster& cluster,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, ThreadLocal::SlotAllocator& tls, bool added_via_api)
: Upstream::ClusterImplBase(cluster, runtime, factory_context, std::move(stats_scope),
added_via_api),
added_via_api, factory_context.dispatcher().timeSource()),
cluster_manager_(cluster_manager), runtime_(runtime), random_(random), tls_(tls),
clusters_(config.clusters().begin(), config.clusters().end()) {}

Expand Down
4 changes: 2 additions & 2 deletions source/extensions/clusters/dynamic_forward_proxy/cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Cluster::Cluster(
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
: Upstream::BaseDynamicClusterImpl(cluster, runtime, factory_context, std::move(stats_scope),
added_via_api),
added_via_api, factory_context.dispatcher().timeSource()),
dns_cache_manager_(cache_manager_factory.get()),
dns_cache_(dns_cache_manager_->getCache(config.dns_cache_config())),
update_callbacks_handle_(dns_cache_->addUpdateCallbacks(*this)), local_info_(local_info),
Expand Down Expand Up @@ -107,7 +107,7 @@ void Cluster::addOrUpdateWorker(
new_host_map->try_emplace(host, host_info,
std::make_shared<Upstream::LogicalHost>(
info(), host, host_info->address(), dummy_locality_lb_endpoint_,
dummy_lb_endpoint_, nullptr));
dummy_lb_endpoint_, nullptr, time_source_));
if (hosts_added == nullptr) {
hosts_added = std::make_unique<Upstream::HostVector>();
}
Expand Down
Loading