pnowojski commented on a change in pull request #18845:
URL: https://github.com/apache/flink/pull/18845#discussion_r811303163
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpoint.java
##########
@@ -327,6 +331,9 @@ public static boolean checkpointsMatch(
*/
void setDiscardCallback(@Nullable CompletedCheckpointStats.DiscardCallback
discardCallback) {
this.discardCallback = discardCallback;
+ if (discardCallback != null && isDiscarded) {
+ discardCallback.notifyDiscardedCheckpoint();
+ }
Review comment:
> right now it is possible that it can be called twice
Aren't all of those places mutually exclusive? That logic in the
`CheckpointCoordinator` guarantees that only one of them will be executed? I'm
pretty sure that at the very least discard and non-discard code paths must be
mutually exclusive.
Frankly it sounds like `notifyDiscardedCheckpoint()` should be more
something like `markCheckpointDiscarded()` called from the
`CheckpointsCoordinator`, around the same place that checkpoint is decided to
be discarded, and not where checkpoint is being actually discarded?
--
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]