lidavidm commented on code in PR #36517:
URL: https://github.com/apache/arrow/pull/36517#discussion_r1287204630
##########
cpp/src/arrow/flight/transport/grpc/grpc_client.cc:
##########
@@ -702,10 +828,22 @@ class GrpcClientImpl : public internal::ClientTransport {
stub_ = pb::FlightService::NewStub(
::grpc::experimental::CreateCustomChannelWithInterceptors(
grpc_uri.str(), creds, args, std::move(interceptors)));
+
+#ifdef GRPC_ENABLE_ASYNC
+ garbage_bin_ = std::make_shared<GrpcGarbageBin>();
+#endif
+
return Status::OK();
}
Status Close() override {
+#ifdef GRPC_ENABLE_ASYNC
+ // XXX: if there are async RPCs running when the client is
+ // stopped, then when they go to use the garbage bin, they'll
+ // instead synchronously dispose of resources from the callback
+ // thread, and will likely crash.
Review Comment:
The other way would be to track and wait for all RPCs to finish (adding the
overhead on every call, and possibly defeating the point of this work in the
first place.)
--
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]