Hi Chen,

Thanks for bringing this up. Flight doesn't have explicit handling for this 
case in any implementation. What is the use case for enabling this?

>From what I see, what's desired is:

- Existing RPCs should be able to finish,
- The connection should terminate,
- gRPC's connection management should automatically reconnect (and likely get 
re-load-balanced) on the next call

but what you're seeing is that existing RPCs are getting interrupted (likely 
because the client did not terminate the connection)? Does the UNAVAILABLE 
error indicate whether the GOAWAY is the first one (with debug string 
"max_age") or a different one? (I'm wondering if the gRPC client is not 
actually handling this case properly and terminating on the first GOAWAY.)

If this sounds right, then when I get a chance, I'll do some more investigation 
& report back/file a JIRA.

-David

On 2021/08/31 23:15:54, Chen Song <[email protected]> wrote: 
> Recently, we turned on MAX_CONNECTION_AGE
> <https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md#proposal>
> on gRPC server. My understanding is that the server will send GOAWAY with
> status code NO_ERROR to the client but don't kill the connection until
> MAX_CONNECTION_AGE_GRACE is reached. In response, the client can properly
> handle this and continue with the current stream (w/o creating new stream).
> 
> We set the former to be 30 minutes and the latter to very long (like a
> day). However, we started seeing FlightRuntimeException with
> CallStatus=UNAVAILABLE thrown from the client wrapping the underlying
> GOAWAY error. It seems to be thrown from FlightStream.java
> <https://arrow.apache.org/docs/java/reference/org/apache/arrow/flight/FlightStream.html#next-->
> .
> 
> My question is, is this how Flight currently handles this type of error? If
> so, can it be improved to handle it a better way (e.g., NO_ERROR meaning
> the current stream can continue)?
> 
> BTW, I haven't dug too much but I don't seem to see this thrown explicitly
> in plain gRPC client.
> 
> Best,
> -- 
> Chen Song
> 

Reply via email to