carp84 commented on issue #9030: [FLINK-13123] Align Stop/Cancel Commands in 
CLI and REST Interface and Improve Documentation
URL: https://github.com/apache/flink/pull/9030#issuecomment-509992422
 
 
   Thanks for the comments and further explanation @zentol @knaufk .
   
   I agree that there were few implementations of `StoppableFunction` in our 
code base, while besides the possible user-customized implementations, we 
actually have removed the necessity of having a "stoppable source" and 
introduced a new way to stop from the source through FLIP-34, that if it's a 
`CheckpointType.SYNC_SAVEPOINT` or say a synchronous savepoint, the source task 
will be finished after the savepoint completes (full source code reference 
[here](https://github.com/apache/flink/blob/28ac5ef7f1769e9256b3089ed4853736771ae457/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L808)):
   ```
   if (isRunning && syncSavepointLatch.isSet()) {
   
           final boolean checkpointWasAcked =
                           
syncSavepointLatch.blockUntilCheckpointIsAcknowledged();
   
           if (checkpointWasAcked) {
                   finishTask();
           }
   }
   ```
   
   And I'm proposing to reinforce the job stop semantic in FLIP-45 after which 
we will support the normal `stop` command again but will always accompanied by 
a checkpoint (by introducing a new `CheckpointType.SYNC_CHECKPOINT`), and I'd 
suggest to consider these together if possible, to prevent back and forth 
changes. Wdyt? Thanks.

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


With regards,
Apache Git Services

Reply via email to