Skip to content

Commit

Permalink
rls: remove wrong empty address checke for child lb (#9005)
Browse files Browse the repository at this point in the history
We shouldn't require addresses to be non-empty for the child lb of rls_lb. That might be a right requirement when the child lb is grpclb, but in our new usecase, the child lb will be cds lb and will only work if empty address is allowed.

Fixing b/223866089#comment24
  • Loading branch information
dapengzhang0 committed Mar 22, 2022
1 parent 4a0fe99 commit 37904a0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package io.grpc.rls;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

import io.grpc.Attributes;
Expand All @@ -33,8 +32,7 @@ final class ChildLbResolvedAddressFactory implements ResolvedAddressFactory {

ChildLbResolvedAddressFactory(
List<EquivalentAddressGroup> addresses, Attributes attributes) {
checkArgument(addresses != null && !addresses.isEmpty(), "Address must be provided");
this.addresses = Collections.unmodifiableList(addresses);
this.addresses = Collections.unmodifiableList(checkNotNull(addresses, "addresses"));
this.attributes = checkNotNull(attributes, "attributes");
}

Expand Down

0 comments on commit 37904a0

Please sign in to comment.