[ 
https://issues.apache.org/jira/browse/BEAM-8824?focusedWorklogId=362620&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-362620
 ]

ASF GitHub Bot logged work on BEAM-8824:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Dec/19 18:27
            Start Date: 23/Dec/19 18:27
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on pull request #10216: [BEAM-8824] 
Add support to allow specify window allowed_lateness in python sdk
URL: https://github.com/apache/beam/pull/10216#discussion_r360967814
 
 

 ##########
 File path: sdks/python/apache_beam/transforms/trigger.py
 ##########
 @@ -1180,6 +1181,11 @@ def merge(_, to_be_merged, merge_result):  # pylint: 
disable=no-self-argument
         for window in merged_away:
           state.clear_state(window, self.WATERMARK_HOLD)
 
+    # drop expired windows
+    for window in list(windows_to_elements.keys()):
+      if input_watermark > window.end + self.allowed_lateness:
+        del windows_to_elements[window]
 
 Review comment:
   Yes. Once it's fallen behind, it can be dropped at any point. 
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 362620)
    Time Spent: 9h 20m  (was: 9h 10m)

> Add support for allowed lateness in python sdk
> ----------------------------------------------
>
>                 Key: BEAM-8824
>                 URL: https://issues.apache.org/jira/browse/BEAM-8824
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Yichi Zhang
>            Assignee: Yichi Zhang
>            Priority: Major
>          Time Spent: 9h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to