liferoad commented on code in PR #35050:
URL: https://github.com/apache/beam/pull/35050#discussion_r2121151646


##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java:
##########
@@ -1533,6 +1533,8 @@ private <K> void processTimerDirect(
     currentTimer = timer;
     currentTimeDomain = timeDomain;
     doFnInvoker.invokeOnTimer(timerId, timerFamilyId, onTimerContext);
+    // Finalize state to ensure metrics and other state changes are committed.
+    this.stateAccessor.finalizeState();

Review Comment:
   I haven't verified this and just want to create the PR to get some feedback 
from you. I noticed `this.stateAccessor.finalizeState` has been called in other 
places (e.g., 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/SplittableSplitAndSizeRestrictionsDoFnRunner.java)
 outside finishBundle. Not fully understand the code but want to put this PR 
out for some feedback first.



-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to