You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2021/04/19 05:41:37 UTC

[flink] branch release-1.13 updated: [FLINK-22327][python] Makes sure that bundleStarted is set to false when it throws exception in finishBundle

This is an automated email from the ASF dual-hosted git repository.

dianfu pushed a commit to branch release-1.13
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.13 by this push:
     new a428ed4  [FLINK-22327][python] Makes sure that bundleStarted is set to false when it throws exception in finishBundle
a428ed4 is described below

commit a428ed4b6ab7a469ed25ab77471d93d8c3f6867d
Author: Dian Fu <di...@apache.org>
AuthorDate: Sat Apr 17 05:38:27 2021 +0800

    [FLINK-22327][python] Makes sure that bundleStarted is set to false when it throws exception in finishBundle
    
    This closes #15650.
---
 .../api/runners/python/beam/BeamPythonFunctionRunner.java          | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/flink-python/src/main/java/org/apache/flink/streaming/api/runners/python/beam/BeamPythonFunctionRunner.java b/flink-python/src/main/java/org/apache/flink/streaming/api/runners/python/beam/BeamPythonFunctionRunner.java
index 1e95b67..78dd53c 100644
--- a/flink-python/src/main/java/org/apache/flink/streaming/api/runners/python/beam/BeamPythonFunctionRunner.java
+++ b/flink-python/src/main/java/org/apache/flink/streaming/api/runners/python/beam/BeamPythonFunctionRunner.java
@@ -327,8 +327,11 @@ public abstract class BeamPythonFunctionRunner implements PythonFunctionRunner {
     @Override
     public void flush() throws Exception {
         if (bundleStarted) {
-            finishBundle();
-            bundleStarted = false;
+            try {
+                finishBundle();
+            } finally {
+                bundleStarted = false;
+            }
         }
     }