github-actions[bot] commented on code in PR #62613:
URL: https://github.com/apache/doris/pull/62613#discussion_r3114688448
##########
be/src/udf/python/python_server.py:
##########
@@ -2262,9 +2270,7 @@ def _handle_exchange_udaf(
e,
Review Comment:
Changing this `except` block from a structured `success=false` response to
`raise` breaks the existing UDAF cleanup contract. Once the Flight stream
fails, `PythonClient::handle_error()` resets `_writer/_reader`, so
`AggregatePythonUDAF::destroy()` cannot send `DESTROY` anymore, and
`PythonUDAFClient::close()` also returns early when `_writer` is null. Because
the Python workers are pooled and `FlightServer.udaf_state_managers` lives for
the process lifetime, the leaked `state_manager.states[place_id]` entry
survives the failed query. A `finish()`/`merge()`/`serialize()`/`reset()`
exception now leaves remote aggregate state behind until that worker is
recycled. Please either keep the structured UDAF failure response here or add
an explicit reconnect/cleanup path on the C++ side before switching these
errors to stream failures.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]