Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added log for empty load assignment #440

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,30 @@ class EnvoySnapshotFactory(
// endpointsFactory.filterEndpoints() can use this cache to prevent computing the same
// ClusterLoadAssignments many times - it may reduce MEM, CPU and latency if some serviceTags are
// commonly used
endpointsFactory.filterEndpoints(endpoints, routeSpec.settings.routingPolicy).let {
endpointsFactory.assignLocalityWeights(routeSpec, it)
}
endpointsFactory.filterEndpoints(endpoints, routeSpec.settings.routingPolicy)
.also {
if (it.endpointsList.isEmpty() &&
properties.debugServiceNames.contains(routeSpec.clusterName)
) {
logger.warn(
"Filtering endpoints resulted in empty list for ${routeSpec.clusterName}. " +
"Endpoints before filter: $endpoints"
)
}
}
.let {
endpointsFactory.assignLocalityWeights(routeSpec, it)
}
.also {
if (it.endpointsList.isEmpty() &&
properties.debugServiceNames.contains(routeSpec.clusterName)
) {
logger.warn(
"Assigning weights resulted in empty endpoints for ${routeSpec.clusterName}. " +
"Endpoints before filter: $endpoints\""
)
}
}
}
}
val rateLimitClusters =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class SnapshotProperties {
var tcpDumpsEnabled: Boolean = true
var shouldAuditGlobalSnapshot: Boolean = true
var compression: CompressionProperties = CompressionProperties()
var debugServiceNames: List<String> = emptyList()
}

class PathNormalizationProperties {
Expand Down
Loading