dawidwys commented on a change in pull request #16589:
URL: https://github.com/apache/flink/pull/16589#discussion_r681178576
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceOperatorStreamTask.java
##########
@@ -116,20 +116,21 @@ protected void finishTask() throws Exception {
public CompletableFuture<Boolean> triggerCheckpointAsync(
CheckpointMetaData checkpointMetaData, CheckpointOptions
checkpointOptions) {
if (!isExternallyInducedSource) {
- return super.triggerCheckpointAsync(checkpointMetaData,
checkpointOptions);
+ if (checkpointOptions.getCheckpointType().shouldDrain()) {
+ return triggerStopWithSavepointWithDrain(checkpointMetaData,
checkpointOptions);
+ } else {
+ return super.triggerCheckpointAsync(checkpointMetaData,
checkpointOptions);
+ }
} else {
return CompletableFuture.completedFuture(isRunning());
}
}
- @Override
- protected CompletableFuture<Void> stopIfSourceMailboxAction() throws
Exception {
+ private CompletableFuture<Boolean> triggerStopWithSavepointWithDrain(
Review comment:
Really sorry, about that. I updated that a few minutes before your
review. I forgot to do that after I reverted the part where I moved it to the
`performCheckpoint`. Really sorry.
--
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]