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


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorImpl.java:
##########
@@ -469,6 +550,7 @@ public void waitForPendingCheckpoints() throws Exception {
 
     @Override
     public void close() throws IOException {
+        cancelAlignmentTimer();

Review Comment:
   I think there is another problem. This method is called `close()`, but it's 
actually should be `cancel()`. It's called only during cancellation, to wake up 
threads that might be waiting for something. And the issue is that cancellation 
is/can be called from  non task threads.
   
   I think we should:
   1. rename the old `close()` to `cancel()`, and keep it as it was - without 
calling `cancelAlignmentTimer()`, there is no need for that, nobody is waiting 
on this timer.
   2. add a new method `close()` that would call both `cancelAlignmentTimer()` 
and `cancel()`
   ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to