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

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

                Author: ASF GitHub Bot
            Created on: 16/Dec/19 23:40
            Start Date: 16/Dec/19 23:40
    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_r358523914
 
 

 ##########
 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:
   This test is not on the element timestamp, but window end. It seems it would 
be cleaner to simply not add it up at line 1151. (We need it up there to avoid 
merging on "unseen" data as well). 
 
----------------------------------------------------------------
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: 360589)
    Time Spent: 7h 50m  (was: 7h 40m)

> 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: 7h 50m
>  Remaining Estimate: 0h
>




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

Reply via email to