diff --git a/xds/internal/balancer/clusterimpl/picker.go b/xds/internal/balancer/clusterimpl/picker.go index bcade35cba5..8cce0755308 100644 --- a/xds/internal/balancer/clusterimpl/picker.go +++ b/xds/internal/balancer/clusterimpl/picker.go @@ -102,17 +102,15 @@ func newPicker(s balancer.State, config *dropConfigs, loadStore load.PerClusterR func (d *picker) Pick(info balancer.PickInfo) (balancer.PickResult, error) { // Don't drop unless the inner picker is READY. Similar to // https://github.com/grpc/grpc-go/issues/2622. - if d.s.ConnectivityState != connectivity.Ready { - return d.s.Picker.Pick(info) - } - - // Check if this RPC should be dropped by category. - for _, dp := range d.drops { - if dp.drop() { - if d.loadStore != nil { - d.loadStore.CallDropped(dp.category) + if d.s.ConnectivityState == connectivity.Ready { + // Check if this RPC should be dropped by category. + for _, dp := range d.drops { + if dp.drop() { + if d.loadStore != nil { + d.loadStore.CallDropped(dp.category) + } + return balancer.PickResult{}, status.Errorf(codes.Unavailable, "RPC is dropped") } - return balancer.PickResult{}, status.Errorf(codes.Unavailable, "RPC is dropped") } }