mirror of https://github.com/grpc/grpc-java.git
xds: fix RingHash LB null pointer issue (#8438)
This commit is contained in:
parent
e45aab085c
commit
cae2339366
|
|
@ -188,8 +188,10 @@ final class CdsLoadBalancer2 extends LoadBalancer {
|
|||
if (root.result.lbPolicy() == LbPolicy.RING_HASH) {
|
||||
lbProvider = lbRegistry.getProvider("ring_hash");
|
||||
lbConfig = new RingHashConfig(root.result.minRingSize(), root.result.maxRingSize());
|
||||
} else {
|
||||
}
|
||||
if (lbProvider == null) {
|
||||
lbProvider = lbRegistry.getProvider("round_robin");
|
||||
lbConfig = null;
|
||||
}
|
||||
ClusterResolverConfig config = new ClusterResolverConfig(
|
||||
Collections.unmodifiableList(instances), new PolicySelection(lbProvider, lbConfig));
|
||||
|
|
|
|||
Loading…
Reference in New Issue