riteshghorse commented on code in PR #26101:
URL: https://github.com/apache/beam/pull/26101#discussion_r1170796423


##########
sdks/go/pkg/beam/core/runtime/exec/datasource.go:
##########
@@ -265,6 +265,30 @@ func (n *DataSource) Process(ctx context.Context) 
([]*Checkpoint, error) {
                func(bcr *byteCountReader, ptransformID, timerFamilyID string) 
error {
                        tmap, err := decodeTimer(cp, wc, bcr)
                        log.Infof(ctx, "DEBUGLOG: timer received for: %v and %v 
- %+v  err: %v", ptransformID, timerFamilyID, tmap, err)
+                       log.Infof(ctx, "OnTimerTransforms = %+v", 
n.OnTimerTransforms[ptransformID].Fn)
+                       if fn, ok := 
n.OnTimerTransforms[ptransformID].Fn.OnTimerFn(); ok {
+                               log.Infof(ctx, "found ontimer method, invoking 
callback")
+                               _, err := 
n.OnTimerTransforms[ptransformID].InvokeTimerFn(ctx, fn, timerFamilyID, tmap)
+                               if err != nil {
+                                       return errors.WithContext(err, "ontimer 
callback invocation failed")
+                               }
+                       }
+                       // Check if there's a continuation and return residuals
+                       // Needs to be done immediately after processing to not 
lose the element.
+                       // if c := n.getProcessContinuation(); c != nil {
+                       //      cp, err := n.checkpointThis(ctx, c)
+                       //      if err != nil {
+                       //              // Errors during checkpointing should 
fail a bundle.
+                       //              return err
+                       //      }
+                       //      if cp != nil {
+                       //              checkpoints = append(checkpoints, cp)
+                       //      }
+                       // }
+                       //      We've finished processing an element, check if 
we have finished a split.
+                       // if n.incrementIndexAndCheckSplit() {
+                       //      return splitSuccess
+                       // }

Review Comment:
   Done, thanks!



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

Reply via email to