[
https://issues.apache.org/jira/browse/BEAM-10400?focusedWorklogId=459719&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-459719
]
ASF GitHub Bot logged work on BEAM-10400:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Jul/20 08:46
Start Date: 16/Jul/20 08:46
Worklog Time Spent: 10m
Work Description: je-ik commented on a change in pull request #12155:
URL: https://github.com/apache/beam/pull/12155#discussion_r448579090
##########
File path:
runners/direct-java/src/main/java/org/apache/beam/runners/direct/StatefulParDoEvaluatorFactory.java
##########
@@ -270,11 +177,13 @@ public void processElement(WindowedValue<KeyedWorkItem<K,
KV<K, InputT>>> gbkRes
delegateEvaluator.processElement(windowedValue);
}
- Instant currentInputWatermark =
timerInternals.currentInputWatermarkTime();
+ final Instant inputWatermarkTime =
timerInternals.currentInputWatermarkTime();
PriorityQueue<TimerData> toBeFiredTimers =
new PriorityQueue<>(Comparator.comparing(TimerData::getTimestamp));
gbkResult.getValue().timersIterable().forEach(toBeFiredTimers::add);
- while (!toBeFiredTimers.isEmpty()) {
+
+ while (!timerInternals.containsUpdateForTimeBefore(inputWatermarkTime)
+ && !toBeFiredTimers.isEmpty()) {
Review comment:
It can happen that elements processed inside this bundle set timer, so
it is technically better to check this before firing any timer. In practice it
probably doesn't matter, because DirectRunner currently apparently doesn't mix
bundles with timers and bundles with 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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 459719)
Time Spent: 2h 50m (was: 2h 40m)
> DirectRunner: race condition in watermark update
> ------------------------------------------------
>
> Key: BEAM-10400
> URL: https://issues.apache.org/jira/browse/BEAM-10400
> Project: Beam
> Issue Type: Bug
> Components: runner-direct
> Affects Versions: 2.23.0
> Reporter: Jan Lukavský
> Assignee: Jan Lukavský
> Priority: P2
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
> When watermark is updated in upstream PTransform, it is *instantly*
> propagated as input watermark to all directly connected downstream
> PTransforms. We must ensure that all output bundles that were emitted before
> the watermark update are processed before we allow updating input watermark
> of downstream PTransform.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)