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

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

                Author: ASF GitHub Bot
            Created on: 12/Oct/20 20:53
            Start Date: 12/Oct/20 20:53
    Worklog Time Spent: 10m 
      Work Description: youngoli commented on a change in pull request #13070:
URL: https://github.com/apache/beam/pull/13070#discussion_r503526693



##########
File path: sdks/go/pkg/beam/core/runtime/exec/sdf.go
##########
@@ -338,12 +348,17 @@ func (n *ProcessSizedElementsAndRestrictions) 
ProcessElement(_ context.Context,
                // If we need to process the element in multiple windows, each 
one needs
                // its own RTracker and progress must be tracked among all 
windows by
                // currW updated between processing.
-               for _, w := range elm.Windows {
+               n.numW = len(elm.Windows)
+
+               //for _, w := range elm.Windows {

Review comment:
       Removed the commented out line. It's actually not identical because a 
dynamic split can modify n.numW if some of the windows are split with the 
residual, which is why I loop using numW instead. I could theoretically loop 
based on `len(elm.Windows)` instead, avoiding the `range` keyword, and directly 
trim the windows slice in the current element, but I don't know if there's any 
advantage to doing it that way and this seems simpler.




----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 499629)
    Time Spent: 1h  (was: 50m)

> Fix multi-window SDF splitting in Go.
> -------------------------------------
>
>                 Key: BEAM-11020
>                 URL: https://issues.apache.org/jira/browse/BEAM-11020
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Daniel Oliveira
>            Assignee: Daniel Oliveira
>            Priority: P2
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> When splitting an element that's being processed on multiple windows, 
> currently the element gets split based on the current progress of the current 
> element+window pair, and the primary and residual both contain all windows 
> from the original. This is incorrect as certain windows in the residual have 
> already been processed.
> The correct way to perform this split is to put the element + all fully 
> processed windows in the primary, the element + all fully unprocessed windows 
> in the residual, and then only split the element at the current element + 
> window pair.
> This fix should already be in Java and Python, so those can be referenced.



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

Reply via email to