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/07/01 17:21:40 UTC

[GitHub] [beam] je-ik commented on a change in pull request #12152: [WIP] Fix direct runner race during watermark update

je-ik commented on a change in pull request #12152:
URL: https://github.com/apache/beam/pull/12152#discussion_r448509205



##########
File path: runners/direct-java/src/main/java/org/apache/beam/runners/direct/QuiescenceDriver.java
##########
@@ -70,6 +71,8 @@ public static ExecutionDriver create(
   private final Map<AppliedPTransform<?, ?, ?>, ConcurrentLinkedQueue<CommittedBundle<?>>>
       pendingRootBundles;
   private final Queue<WorkUpdate> pendingWork = new ConcurrentLinkedQueue<>();
+  private final Map<AppliedPTransform<?, ?, ?>, Collection<CommittedBundle<?>>> inflightBundles =
+      new ConcurrentHashMap<>();

Review comment:
       We collect here bundles and AppliedPTransforms that have started to process bundle, but have not completed it yet. The reason for that is that the bundle processing *might* change output watermark of a PTransform *before* enqueuing the resulting bundle to pendingUpdates of downstream PTransform, which can lead to watermark being updated past the emitted elements.




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