You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/28 15:26:59 UTC

[GitHub] [beam] lukecwik commented on a change in pull request #12706: [BEAM-6868, BEAM-10670] Add support for bundle finalization to DoFnOperator for non-portable streaming pipelines.

lukecwik commented on a change in pull request #12706:
URL: https://github.com/apache/beam/pull/12706#discussion_r479377197



##########
File path: runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -191,6 +194,17 @@
 
   private final boolean finishBundleBeforeCheckpointing;
 
+  /** Stores new finalizations being gathered. */
+  private transient InMemoryBundleFinalizer bundleFinalizer;
+  /** Pending bundle finalizations which have not been acknowledged yet. */
+  private transient LinkedHashMap<Long, List<InMemoryBundleFinalizer.Finalization>>
+      pendingFinalizations;
+  /**
+   * Keep a maximum of 32 bundle finalizations for {@link
+   * BundleFinalizer.Callback#onBundleSuccess()}.
+   */
+  private static final int MAX_NUMBER_PENDING_BUNDLE_FINALIZATIONS = 32;

Review comment:
       I forgot to add the clean-up logic bounding how many there could be.




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

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