scwhittle commented on code in PR #37723:
URL: https://github.com/apache/beam/pull/37723#discussion_r2904066600


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java:
##########
@@ -446,11 +451,28 @@ public void invalidateCache() {
     }
   }
 
-  public Map<Long, Runnable> flushState() {
-    Map<Long, Runnable> callbacks = new HashMap<>();
+  public Map<Long, Pair<Instant, Runnable>> flushState() {
+    Map<Long, Pair<Instant, Runnable>> callbacks = new HashMap<>();
 
+    List<Pair<Instant, BundleFinalizer.Callback>> bundleFinalizers = new 
ArrayList<>();
     for (StepContext stepContext : getAllStepContexts()) {
       stepContext.flushState();
+      bundleFinalizers.addAll(stepContext.flushBundleFinalizerCallbacks());

Review Comment:
   nit: it doesn't seem like we need bundleFinalizers all at once. We could 
save the allocation by getting rid of it and just iterate over the callbacks 
here and add them to the callbacks map



##########
runners/google-cloud-dataflow-java/build.gradle:
##########


Review Comment:
   Instead of the specific tests, you can exclude the category
   
   `excludedCategories: [ 'org.apache.beam.sdk.testing.UsesBundleFinalizer', ],`



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