raulcd commented on code in PR #50687:
URL: https://github.com/apache/arrow/pull/50687#discussion_r3668057264


##########
python/pyarrow/_flight.pyx:
##########
@@ -3234,6 +3235,7 @@ cdef class FlightServerBase(_Weakrefable):
             raise ValueError("shutdown() on uninitialized FlightServerBase")
         with nogil:
             check_flight_status(self.server.get().Shutdown())
+        self.server.get().ReleasePythonServerRef()

Review Comment:
   Commenting this line, the single failing test on `test_flight.py`:
   ```python
   
======================================================================================================
 FAILURES 
======================================================================================================
   
____________________________________________________________________________________________
 test_flight_server_is_freed 
_____________________________________________________________________________________________
   
       def test_flight_server_is_freed():
           # Calling server.shutdown manually should free the server object.
           server = FlightServerBase('grpc://localhost:0')
           server.shutdown()
           server.wait()
           ref = weakref.ref(server)
           del server
           gc.collect()
   >       assert ref() is None
   E       AssertionError: assert <pyarrow._flight.FlightServerBase object at 
0x7fbb4dba7380> is None
   E        +  where <pyarrow._flight.FlightServerBase object at 
0x7fbb4dba7380> = <weakref at 0x7fbb4dba7650; to 
'pyarrow._flight.FlightServerBase' at 0x7fbb4dba7380>()
   
   pyarrow/tests/test_flight.py:1143: AssertionError
   
==============================================================================================
 short test summary info 
===============================================================================================
   FAILED pyarrow/tests/test_flight.py::test_flight_server_is_freed - 
AssertionError: assert <pyarrow._flight.FlightServerBase object at 
0x7fbb4dba7380> is None
   ```



-- 
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]

Reply via email to