diff --git a/util/src/main/java/io/grpc/util/MultiChildLoadBalancer.java b/util/src/main/java/io/grpc/util/MultiChildLoadBalancer.java index fa31755ea35..f0cc393cc1f 100644 --- a/util/src/main/java/io/grpc/util/MultiChildLoadBalancer.java +++ b/util/src/main/java/io/grpc/util/MultiChildLoadBalancer.java @@ -111,9 +111,10 @@ protected Map createChildLbMap(ResolvedAddresses resolvedA Object policyConfig = resolvedAddresses.getLoadBalancingPolicyConfig(); for (EquivalentAddressGroup eag : addresses) { EquivalentAddressGroup strippedEag = stripAttrs(eag); // keys need to be just addresses - ChildLbState childLbState = childLbMap.getOrDefault(strippedEag, - createChildLbState(strippedEag, policyConfig, getInitialPicker())); - childLbMap.put(strippedEag, childLbState); + if (!childLbMap.containsKey(strippedEag)) { + childLbMap.put(strippedEag, + createChildLbState(strippedEag, policyConfig, getInitialPicker())); + } } return childLbMap; }