reuvenlax commented on a change in pull request #11350:
URL: https://github.com/apache/beam/pull/11350#discussion_r426413338



##########
File path: 
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java
##########
@@ -591,7 +595,7 @@ public void flushState() {
               timerId,
               "",
               cleanupTime,
-              cleanupTime,
+              cleanupTime.minus(1L),

Review comment:
       I want to avoid the performance regression of setting a watermark hold 
if not needed.  Make the outputTimestamp be a parameter to this function, and 
pass it in only if the DoFn has an onWindowExpiration (SimpleParDoFn has the 
DoFnSignature so you should be able to tell there).

##########
File path: 
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java
##########
@@ -552,7 +552,11 @@ public void flushState() {
       if (!cachedFiredTimers.hasNext()) {
         return null;
       }
-      return cachedFiredTimers.next();
+      TimerData nextTimer = cachedFiredTimers.next();
+      // system timers ( GC timer) must be explicitly deleted when delivered, 
to release the implied
+      // hold.
+      systemTimerInternals.deleteTimer(nextTimer);

Review comment:
       I think we should only do this if there is a hold to delete.




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