mirror of https://github.com/grpc/grpc-java.git
xds: fix order of processing resolution errors with original cluster ordering (#8224)
When aggregating the endpoint resolution errors of the list of clusters in ClusterResolverLoadBalancer, clusters should be processed in its original order as received in the LB config. The last cluster's error is used as the overall error status.
This commit is contained in:
parent
d4e90a78fd
commit
a589c2c68f
|
|
@ -254,7 +254,8 @@ final class ClusterResolverLoadBalancer extends LoadBalancer {
|
|||
private void handleEndpointResolutionError() {
|
||||
boolean allInError = true;
|
||||
Status error = null;
|
||||
for (ClusterState state : clusterStates.values()) {
|
||||
for (String cluster : clusters) {
|
||||
ClusterState state = clusterStates.get(cluster);
|
||||
if (state.status.isOk()) {
|
||||
allInError = false;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue