[ 
https://issues.apache.org/jira/browse/BEAM-11481?focusedWorklogId=525487&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-525487
 ]

ASF GitHub Bot logged work on BEAM-11481:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Dec/20 10:51
            Start Date: 17/Dec/20 10:51
    Worklog Time Spent: 10m 
      Work Description: dmvk commented on a change in pull request #13571:
URL: https://github.com/apache/beam/pull/13571#discussion_r544993985



##########
File path: 
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -992,7 +997,23 @@ public void onProcessingTime(InternalTimer<ByteBuffer, 
TimerData> timer) {
 
   // allow overriding this in ExecutableStageDoFnOperator to set the key 
context
   protected void fireTimerInternal(ByteBuffer key, TimerData timerData) {
+    long oldHold = keyCoder != null ? keyedStateInternals.minWatermarkHoldMs() 
: -1L;
     fireTimer(timerData);
+    emitWatermarkIfHoldChanged(oldHold);
+  }
+
+  void emitWatermarkIfHoldChanged(long currentWatermarkHold) {
+    if (keyCoder != null) {
+      long newWatermarkHold = keyedStateInternals.minWatermarkHoldMs();
+      if (newWatermarkHold > currentWatermarkHold) {
+        try {
+          processInputWatermark(false);
+        } catch (Exception ex) {
+          // should not happen

Review comment:
       can you please add this as a message for IllegalStateException?




----------------------------------------------------------------
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: 525487)
    Time Spent: 0.5h  (was: 20m)

> FlinkRunner might not advance output watermark on change of watermark hold
> --------------------------------------------------------------------------
>
>                 Key: BEAM-11481
>                 URL: https://issues.apache.org/jira/browse/BEAM-11481
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-flink
>    Affects Versions: 2.26.0
>            Reporter: Jan Lukavský
>            Assignee: Jan Lukavský
>            Priority: P0
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Output watermark of DoFnOperator is advanced only when new input watermark is 
> received. The output watermark might advance even on timer or processed 
> element due to updated watermark hold. This especially holds true in 
> splittable DoFn.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to