You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "gyfora (via GitHub)" <gi...@apache.org> on 2023/04/03 10:46:50 UTC

[GitHub] [flink-kubernetes-operator] gyfora commented on a diff in pull request #557: [FLINK-31630] Limit max checkpoint age for last-state upgrade

gyfora commented on code in PR #557:
URL: https://github.com/apache/flink-kubernetes-operator/pull/557#discussion_r1155796107


##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/TestingFlinkService.java:
##########
@@ -448,21 +435,46 @@ public List<String> getDisposedSavepoints() {
 
     @Override
     public Optional<Savepoint> getLastCheckpoint(JobID jobId, Configuration conf) throws Exception {
+        jobs.stream()
+                .filter(js -> js.f1.getJobId().equals(jobId))
+                .findAny()
+                .ifPresent(
+                        t -> {
+                            if (!t.f1.getJobState().isGloballyTerminalState()) {

Review Comment:
   It's just a simple way to ensure that we don't build operator logic relying on last checkpoints when the job is not in a terminal state (because it's not actually guaranteed to be the latest in that case).



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org