Myasuka commented on a change in pull request #16582:
URL: https://github.com/apache/flink/pull/16582#discussion_r751022321



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointSubsumeHelper.java
##########
@@ -46,18 +46,24 @@
 class CheckpointSubsumeHelper {
     private static final Logger LOG = 
LoggerFactory.getLogger(CheckpointSubsumeHelper.class);
 
-    public static void subsume(
+    public static Optional<CompletedCheckpoint> subsume(
             Deque<CompletedCheckpoint> checkpoints, int numRetain, 
SubsumeAction subsumeAction)
             throws Exception {
         if (checkpoints.isEmpty() || checkpoints.size() <= numRetain) {
-            return;
+            return Optional.empty();
         }
         CompletedCheckpoint latest = checkpoints.peekLast();
+        CompletedCheckpoint lastSubsumedCheckpoint = null;

Review comment:
       Thanks for the suggestion, I will refactor it in the next upadte.




-- 
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-unsubscr...@flink.apache.org

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


Reply via email to