zoltar9264 commented on a change in pull request #16969:
URL: https://github.com/apache/flink/pull/16969#discussion_r696260759



##########
File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksIncrementalSnapshotStrategy.java
##########
@@ -188,7 +188,8 @@ public IncrementalRocksDBSnapshotResources 
syncPrepareResources(long checkpointI
     @Override
     public void notifyCheckpointComplete(long completedCheckpointId) {
         synchronized (materializedSstFiles) {
-            if (completedCheckpointId > lastCompletedCheckpointId) {
+            if (completedCheckpointId > lastCompletedCheckpointId
+                    && 
materializedSstFiles.keySet().contains(completedCheckpointId)) {

Review comment:
       Thanks for your suggest.
   
   I think the most direct solution to this problem is to make 
RocksIncrementalSnapshotStrategy aware completedCheckpointId belongs to a 
savepoint, but this is not necessary at this stage.
   
   I will add some comment to describe this change. And add a unit test to 
follow your proposals.




-- 
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]


Reply via email to