raulcd commented on code in PR #50687:
URL: https://github.com/apache/arrow/pull/50687#discussion_r3667926659
##########
python/pyarrow/src/arrow/python/flight.cc:
##########
@@ -86,6 +86,12 @@ PyFlightServer::PyFlightServer(PyObject* server, const
PyFlightServerVtable& vta
server_.reset(server);
}
+void PyFlightServer::ReleasePythonServerRef() {
+ // Resets OwnedRefNoGIL to break the reference cycle between the C++
FlightServerBase
+ // and the Python object.
+ server_.reset();
Review Comment:
> is this method only called after the gRPC server stopped running?
right now, I think so, because it's called always after Shutdown which
ensure the gRPC server is stopped:
https://github.com/apache/arrow/blob/bda98c4d8c4dbf52c6b52186e07a7bb0578c0ac4/cpp/src/arrow/flight/server.cc#L206-L216
It is fair that we are not enforcing it here but we can't override
`FlightServerBase::Shutdown` since it's not virtual so I am unsure how we could
enforce it. Any ideas?
--
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]