You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "pnowojski (via GitHub)" <gi...@apache.org> on 2023/03/08 15:15:38 UTC

[GitHub] [flink] pnowojski commented on a diff in pull request #22134: [FLINK-31370] Prevent more timers from being fired if the StreamTask…

pnowojski commented on code in PR #22134:
URL: https://github.com/apache/flink/pull/22134#discussion_r1129592490


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InternalTimerServiceImpl.java:
##########
@@ -296,7 +302,9 @@ public void advanceWatermark(long time) throws Exception {
 
         InternalTimer<K, N> timer;
 
-        while ((timer = eventTimeTimersQueue.peek()) != null && timer.getTimestamp() <= time) {
+        while ((timer = eventTimeTimersQueue.peek()) != null
+                && timer.getTimestamp() <= time
+                && !cancellationContext.isCancelled()) {

Review Comment:
   I would add the same check 10 lines above in the `onProcessingTimer()` method (and a test for it)



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org