Dian Fu created FLINK-41195:
-------------------------------

             Summary: Avoid flushing Python bundles during task cancellation
                 Key: FLINK-41195
                 URL: https://issues.apache.org/jira/browse/FLINK-41195
             Project: Flink
          Issue Type: Improvement
          Components: API / Python
            Reporter: Dian Fu


Follow-up to FLINK-40135.

PR https://github.com/apache/flink/pull/28716 introduced 
closeBundleAfterCancellation(), which asynchronously calls finishBundle() for 
an active bundle not already being closed. This invokes RemoteBundle.close(), 
flushing buffered input and waiting for Python processing and output delivery.

Cancellation does not require completing the remaining computation or 
collecting its results. For slow or hung UDFs, such as calls to external model 
services, the background cleanup thread and bundle resources may remain 
retained indefinitely while another lease keeps the shared Python worker alive.

See more details on
Discussion: https://github.com/apache/flink/pull/28716#discussion_r4355845587



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to