boyuanzz commented on a change in pull request #13105:
URL: https://github.com/apache/beam/pull/13105#discussion_r516993287



##########
File path: 
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/ExecutableStageDoFnOperator.java
##########
@@ -502,6 +690,8 @@ public void close() throws Exception {
     processWatermark1(Watermark.MAX_WATERMARK);
     while (getCurrentOutputWatermark() < 
Watermark.MAX_WATERMARK.getTimestamp()) {
       invokeFinishBundle();
+      // Sleep for 5s to wait for any timer to be fired.
+      Thread.sleep(5000);

Review comment:
       This was not a bug before we support sdf initiate checkpoint because 
normal processing time timer doesn't hold watermark. Now we are setting 
processing time timer to reschedule sdf residuals which holds the watermark 
back. When entering `ExecutableStageDoFnOperator.close()`, we will always in 
the while loop until all sdf processing timers get fired and watermark holds 
are removed. So the comment ` // Sleep for 5s to wait for any timer to be 
fired.` is not precise. The comment should be ` // Sleep for 5s to wait for any 
SDF timer to be fired.`




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


Reply via email to