pnowojski commented on a change in pull request #16800:
URL: https://github.com/apache/flink/pull/16800#discussion_r688445694
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
##########
@@ -953,7 +953,17 @@ public void releaseOrPromotePartitions(
final Task task = taskSlotTable.getTask(executionAttemptID);
if (task != null) {
- task.triggerCheckpointBarrier(checkpointId, checkpointTimestamp,
checkpointOptions);
+ CompletableFuture<Acknowledge> resultFuture = new
CompletableFuture<>();
+ task.triggerCheckpointBarrier(checkpointId, checkpointTimestamp,
checkpointOptions)
+ .thenApply(
+ triggerResult ->
+ triggerResult
+ ?
resultFuture.complete(Acknowledge.get())
+ :
resultFuture.completeExceptionally(
+ new CheckpointException(
+ "Task is not
running?",
+
CheckpointFailureReason
+
.TRIGGER_CHECKPOINT_FAILURE)));
return CompletableFuture.completedFuture(Acknowledge.get());
Review comment:
🤦 note that in this version
`CompletableFuture.completedFuture(Acknowledge.get())` is returned regardless
if the `resultFuture` succeeded or failed...
--
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]