Is there a way to command a channel to gracefully shutdown, waiting for any 
active calls to complete before terminating the link?
I expected channel.shutdown() to work this way.  However, it appears to 
forcefully kill all active calls after 5 seconds with UNAVAILABLE (Channel 
requested transport to shut down) exceptions.
The 5 second delay appears to be due to a shutdown delay hack in 
SubchannelImplImpl::shutdown.

Is this expected behavior?

I am writing a custom LoadBalancer and I need a way to evict subchannels 
cleanly.
Currently, my solution is to remove the subchannel from the Picker then 
shutting it down once its state changes to IDLE in handleSubchannelState. 
 I don't expect this is the intended way to go about this?

Also, from what I can tell, this may manifest in the 
RoundRobinLoadBalancer.  When the resolved address list changes, any active 
calls that last longer than 5 seconds will be killed.

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/a8834747-2967-4a48-81e2-e3b8f2e6186a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to