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

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

                Author: ASF GitHub Bot
            Created on: 29/Mar/22 22:44
            Start Date: 29/Mar/22 22:44
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on a change in pull request #17045:
URL: https://github.com/apache/beam/pull/17045#discussion_r837965604



##########
File path: sdks/go/pkg/beam/core/runtime/graphx/translate.go
##########
@@ -445,6 +446,9 @@ func (m *marshaller) addMultiEdge(edge NamedEdge) 
([]string, error) {
                        payload.RestrictionCoderId = coderId
                        m.requirements[URNRequiresSplittableDoFn] = true
                }
+               if _, ok := 
edge.Edge.DoFn.ProcessElementFn().BundleFinalization(); ok {
+                       m.requirements[URNRequiresBundleFinalization] = true

Review comment:
       Tiniest note:
   Out of an abundance of caution, I paranoid check how we handle requirements 
on serialization.
   
   Could you add a sort.Strings() call on the returned slice of requirement 
urns from getRequirements? It will help avoid spurious diffs in pipeline protos 
at some time later. 
   
   
https://github.com/apache/beam/blob/35490f37bf17510b7516591c191045b77a567d21/sdks/go/pkg/beam/core/runtime/graphx/translate.go#L218

##########
File path: sdks/go/pkg/beam/core/runtime/graphx/v1/v1.pb.go
##########
@@ -212,18 +212,19 @@ const (
        Type_CONTEXT Type_Special = 2
        Type_TYPE    Type_Special = 3
        // Beam
-       Type_EVENTTIME     Type_Special = 10
-       Type_WINDOW        Type_Special = 22
-       Type_KV            Type_Special = 11
-       Type_COGBK         Type_Special = 13
-       Type_WINDOWEDVALUE Type_Special = 14
-       Type_T             Type_Special = 15
-       Type_U             Type_Special = 16
-       Type_V             Type_Special = 17
-       Type_W             Type_Special = 18
-       Type_X             Type_Special = 19
-       Type_Y             Type_Special = 20
-       Type_Z             Type_Special = 21
+       Type_EVENTTIME          Type_Special = 10
+       Type_WINDOW             Type_Special = 22
+       Type_KV                 Type_Special = 11
+       Type_COGBK              Type_Special = 13
+       Type_WINDOWEDVALUE      Type_Special = 14
+       Type_BUNDLEFINALIZATION Type_Special = 23

Review comment:
       I'm fine with adding it now, I was merely hoping the other PR would get 
in. Merge conflicts happen, and it's not a hard merge, especially since the PR 
simplifies the generation step anyway.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 749687)
    Time Spent: 12h 10m  (was: 12h)

> Enable Bundle Finalization in Go SDK
> ------------------------------------
>
>                 Key: BEAM-10976
>                 URL: https://issues.apache.org/jira/browse/BEAM-10976
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Robert Burke
>            Assignee: Danny McCormick
>            Priority: P3
>          Time Spent: 12h 10m
>  Remaining Estimate: 0h
>
> Eg. to support acking pubsub/kafka messages as processed after the results 
> have been properly committed by the runner.
> Note, that due to BEAM-10959 that when implementing this, an instruction must 
> remain "active" until it's finalization occurs as well. Specifically, we 
> should probably keep another map around for "to be finalized" process bundle 
> instructions so we can return the appropriate "empty" response and not 
> accidently evict them from the nearly equivalent inactive state until after 
> finalization.
> [https://s.apache.org/beam-finalizing-bundles]
>  
> (To be updated once [https://github.com/apache/beam/pull/13160] is merged and 
> the programming guide updated with SDF content.)
> See also Java and Python approaches
> https://beam.apache.org/documentation/programming-guide/#bundle-finalization



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to