Got it! Thanks a lot On Thursday, January 17, 2019 at 2:35:54 PM UTC-8, Kun Zhang wrote: > > You don't need to worry about the timing. As soon as the Subchannel > becomes ready, RoundRobinLoadBalancer should notice that by yet another > call to updateBalancingState() and add it to the round-robin list. If you > continue debugging, you should be able to see that. > > On Wednesday, January 16, 2019 at 1:44:41 PM UTC-8, eleano...@gmail.com > wrote: >> >> Hi Kun, >> >> I am trying to debug further, in >> io.grpc.util.RoundRobinLoadBalancerFactory::handleResolvedAddressGroups >> will be called if the NameResolver.Listener::onAddress is called, >> >> inside handleResolvedAddressGroups method, it is calling >> updateBalancingState(getAggregatedState(), >> getAggregatedError()); where it seems in getAggregatedState(), >> it is not returning the subchannel state as READY, sometimes connecting, >> sometimes idle. >> >> Then in updateBalancingState(), it will only put those subchannel's state >> with READY in the activeList. >> >> So just wonder is there anyway to ensure the sub channel is READY when >> updating the loadbalancer ? >> >> On Wednesday, January 16, 2019 at 12:50:04 PM UTC-8, eleano...@gmail.com >> wrote: >>> >>> Hi Kun, >>> >>> I did see that the new server3 (listening on 9097) has its >>> InternalSubchannel gets created: >>> >>> [io.grpc.internal.InternalSubchannel] (grpc-default-worker-ELG-3-9) >>> [io.grpc.internal.InternalSubchannel-20] >>> io.grpc.netty.NettyClientTransport-21 for localhost/127.0.0.1:9097 is >>> ready >>> [io.grpc.internal.InternalSubchannel] (grpc-default-worker-ELG-3-9) >>> [io.grpc.internal.InternalSubchannel-20] >>> io.grpc.netty.NettyClientTransport-21 for localhost/127.0.0.1:9097 is >>> ready >>> >>> On Wednesday, January 9, 2019 at 10:18:47 AM UTC-8, eleano...@gmail.com >>> wrote: >>>> >>>> Hi, >>>> >>>> in my java gRPC client, when I create the ManagedChannel, I am passing >>>> my custom NameResolver, and using RoundRobinLoadBalancer. When my >>>> NameResolver is notified with a change to the server list (new server >>>> added), it will call Listener.onAddress and pass the updated the list. >>>> >>>> I see from the Log: the onAddress is called from >>>> NameResolverListenerImpl, (9097 is the new server address added) >>>> >>>> resolved address: [[addrs=[localhost/127.0.0.1:9096], attrs={}], >>>> [addrs=[localhost/127.0.0.1:9097], attrs={}]], config={} >>>> >>>> >>>> however, the traffic is not coming to the new server, did I miss >>>> anything? >>>> >>>> >>>> Thanks a lot! >>>> >>>> >>>> >>>> >>>> >>>>
-- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To post to this group, send email to grpc-io@googlegroups.com. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/488e7bc4-4171-4c2d-a7d4-0521ed3fa369%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.