fredia commented on code in PR #19448:
URL: https://github.com/apache/flink/pull/19448#discussion_r881340987


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistryImpl.java:
##########
@@ -156,16 +175,47 @@ public void unregisterUnusedState(long 
lowestCheckpointID) {
                         subsumed.add(entry.stateHandle);
                     }
                     it.remove();
+                } else {
+                    
markCheckpointInUseAction.accept(entry.createdByCheckpointID);
                 }
             }
         }
-
         LOG.trace("Discard {} state asynchronously", subsumed.size());
         for (StreamStateHandle handle : subsumed) {
             scheduleAsyncDelete(handle);
         }
     }
 
+    @Override
+    public void unregisterUnusedState(long lowestCheckpointID) {
+        unregisterState(lowestCheckpointID, (x) -> {});

Review Comment:
   This method is only used to delete unused states and called by `shutdown()`, 
 all checkpoints are discarded by `CompletedCheckpointStore` when shutdown. So, 
 I prefer not to discard checkpoints again.



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