dawidwys commented on a change in pull request #18086:
URL: https://github.com/apache/flink/pull/18086#discussion_r770504698



##########
File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksIncrementalSnapshotStrategy.java
##########
@@ -177,11 +179,27 @@ public IncrementalRocksDBSnapshotResources 
syncPrepareResources(long checkpointI
             return registry -> SnapshotResult.empty();
         }
 
+        final Set<StateHandleID> baseSstFiles;
+        final CheckpointType.SharingFilesStrategy sharingFilesStrategy =
+                
checkpointOptions.getCheckpointType().getSharingFilesStrategy();
+        switch (sharingFilesStrategy) {
+            case FORWARD_BACKWARD:
+                baseSstFiles = snapshotResources.baseSstFiles;
+                break;
+            case FORWARD:
+            case NO_SHARING:

Review comment:
       The `NO_SHARING` mode is used for `SAVEPOINTS`, so we do need to support 
it in general. This mislead me a bit and made me think we need to support it 
here. However, savepoints should never end up in this strategy, but should use 
`RocksFullSnapshotStrategy`. 
   
   Good point! We could throw an exception for `NO_SHARING` as well for now 
until we properly support incremental savepoints. Sorry for not being careful 
here :(




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