arunpandianp commented on code in PR #38988:
URL: https://github.com/apache/beam/pull/38988#discussion_r3440482876


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/SimpleParDoFnHelpers.java:
##########
@@ -293,23 +329,24 @@ public abstract void processTimer(
         TimerInternals.TimerData timer,
         Supplier<StreamingSideInputProcessor<?, ?>> sideInputProcessor)
         throws Exception;
-  };
+  }
 
   void processTimers(
       TimerType mode,
       DataflowExecutionContext.DataflowStepContext context,
       Coder<BoundedWindow> windowCoder,
-      Runnable startKey,
       Supplier<StreamingSideInputProcessor<?, ?>> sideInputProcessor)
       throws Exception {
     TimerInternals.TimerData timer = context.getNextFiredTimer(windowCoder);
-
     if (timer != null && fnRunner == null) {
       // If we need to run reallyStartBundle in here, we need to make sure to 
switch the state
       // sampler into the start state.
       try (Closeable start = operationContext.enterStart()) {
         reallyStartBundle();
-        startKey.run();
+      }
+
+      if (!activeKey) {
+        this.onStartKey.accept((K) context.stateInternals().getKey());

Review Comment:
   move out of ` if (timer != null && fnRunner == null)`



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