Abacn commented on code in PR #37886:
URL: https://github.com/apache/beam/pull/37886#discussion_r2963636507


##########
runners/samza/src/main/java/org/apache/beam/runners/samza/runtime/SamzaDoFnRunners.java:
##########
@@ -433,6 +498,20 @@ public <KeyT> void onTimer(
         Instant outputTimestamp,
         TimeDomain timeDomain,
         CausedByDrain causedByDrain) {
+      // SDF checkpoint timers are handled by loading the stored residual and 
re-processing it.
+      if 
(BundleCheckpointHandlers.StateAndTimerBundleCheckpointHandler.isSdfTimer(timerId))
 {
+        StateInternals stateInternals = 
nonKeyedStateInternalsFactory.stateInternalsForKey(null);
+        WindowedValue<InT> residual =
+            stateInternals
+                .state(
+                    StateNamespaces.window(windowCoder, window),
+                    StateTags.value(timerId, windowedValueCoder))
+                .read();
+        if (residual != null) {
+          processElement(residual);
+        }

Review Comment:
   I think it's an issue in Samza 1.8.0. Reverting SamzaDoFnRunners.java the 
test fails as well. Since Samza is already an inactive project (no new release 
for 3 years) it's not likely get fixed. Let's close this for now.



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