You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by hx...@apache.org on 2023/01/03 07:46:02 UTC

[flink] branch master updated: [hotfix][python] Fix the wrong clearing state logic on processing time window

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

hxb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new eb017831e67 [hotfix][python] Fix the wrong clearing state logic on processing time window
eb017831e67 is described below

commit eb017831e67f87fc2c6456c767b64c65d06d0ce9
Author: huangxingbo <hx...@apache.org>
AuthorDate: Tue Jan 3 15:45:46 2023 +0800

    [hotfix][python] Fix the wrong clearing state logic on processing time window
---
 flink-python/pyflink/fn_execution/datastream/window/window_operator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flink-python/pyflink/fn_execution/datastream/window/window_operator.py b/flink-python/pyflink/fn_execution/datastream/window/window_operator.py
index a2a8c0a8d06..3c7a1c19a9c 100644
--- a/flink-python/pyflink/fn_execution/datastream/window/window_operator.py
+++ b/flink-python/pyflink/fn_execution/datastream/window/window_operator.py
@@ -497,7 +497,7 @@ class WindowOperator(object):
         if trigger_result.is_purge():
             self.window_state.clear()
 
-        if self.window_assigner.is_event_time() and self.is_cleanup_time(
+        if not self.window_assigner.is_event_time() and self.is_cleanup_time(
                 self.trigger_context.window, timestamp):
             self.clear_all_state(self.trigger_context.window, self.window_state, merging_windows)