You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/22 12:50:06 UTC

[GitHub] [flink] rkhachatryan commented on a diff in pull request #18539: [FLINK-25745] Support RocksDB incremental native savepoints

rkhachatryan commented on code in PR #18539:
URL: https://github.com/apache/flink/pull/18539#discussion_r856196969


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/Checkpoints.java:
##########
@@ -369,4 +373,37 @@ public static CheckpointStorage loadCheckpointStorage(
 
     /** This class contains only static utility methods and is not meant to be instantiated. */
     private Checkpoints() {}
+
+    private static class ClaimModeCompletedStorageLocation
+            implements CompletedCheckpointStorageLocation {
+
+        private final CompletedCheckpointStorageLocation wrapped;
+
+        private ClaimModeCompletedStorageLocation(CompletedCheckpointStorageLocation location) {
+            wrapped = location;
+        }
+
+        @Override
+        public String getExternalPointer() {
+            return wrapped.getExternalPointer();
+        }
+
+        @Override
+        public StreamStateHandle getMetadataHandle() {
+            return wrapped.getMetadataHandle();
+        }
+
+        @Override
+        public void disposeStorageLocation() throws IOException {
+            try {
+                wrapped.disposeStorageLocation();
+            } catch (Exception ex) {
+                LOG.debug(
+                        "We could not delete the storage location: {} in CLAIM restore mode. It is"
+                                + " most probably because of shared files still being used by newer"
+                                + " checkpoints",

Review Comment:
   @dawidwys could you please explain this scenario?
   
   AFAIK, shared state files should be placed in a separate `checkpoints/shared` folder and therefore should not prevent `checkpoints/chk-xxx` folder from being deleted.
   However, this is not true when migrating to Changelog, when private state becomes "re-usable".
   
   I'd like to understand whether it's a general case or only related to Changelog.
   
   cc: @zoltar9264 



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