lidavidm commented on issue #11932: URL: https://github.com/apache/arrow/issues/11932#issuecomment-992603633
We are calling Shutdown when you interrupt the server, the issue is this: https://grpc.github.io/grpc/cpp/classgrpc_1_1_server_interface.html#a644772d11101318f1424e595dee73ccf In other words, if there is an ongoing RPC, the gRPC implementation won't shutdown the server. This is an implementation decision of gRPC. I am not sure why is_cancelled seems not to be set, though. (Also note that your overridden shutdown() won't be called, so there is no value to the `threading.Event` except for when you call shutdown in Python.) However you will find that new clients can't connect, as expected. If you interrupt the server, then interrupt the client, then the server will print `interrupted` and shut down as expected. Also, if we don't set the signal handlers, gRPC C++ doesn't react to Ctrl-C at all, so you won't be able to interrupt the server even if there's no clients. So I think the main thing to fix here is to figure out why `ServerCallContext.is_cancelled` is not set when the server is shutdown - would that fix your issue? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
