Skip to content

Commit

Permalink
added log for empty load assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
nastassia-dailidava committed Dec 16, 2024
1 parent 866410f commit 46a320b
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,14 @@ class EnvoySnapshotFactory(
// 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.assignLocalityWeights(routeSpec, it).also { la ->
if (la.endpointsList.any { el -> el.lbEndpointsList.isEmpty() }) {
logger.warn(
"ClusterLoadAssignment for ${routeSpec.clusterName} has empty lbEndpoints, " +
"original clusterLoadAssignment: ${endpoints.toString()}"
)
}
}
}
}
}
Expand Down

0 comments on commit 46a320b

Please sign in to comment.