AlexYinHan commented on code in PR #26040:
URL: https://github.com/apache/flink/pull/26040#discussion_r1925154975


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/datatransfer/DataTransferStrategyBuilder.java:
##########
@@ -45,20 +45,25 @@ public class DataTransferStrategyBuilder {
     private static final Logger LOG = 
LoggerFactory.getLogger(DataTransferStrategyBuilder.class);
 
     public static DataTransferStrategy buildForSnapshot(
+            SnapshotType.SharingFilesStrategy sharingFilesStrategy,
             @Nullable ForStFlinkFileSystem forStFlinkFileSystem,
             @Nullable CheckpointStreamFactory checkpointStreamFactory) {
         return buildForSnapshot(
+                sharingFilesStrategy,
                 forStFlinkFileSystem,
                 isDbPathUnderCheckpointPathForSnapshot(
                         forStFlinkFileSystem, checkpointStreamFactory));
     }
 
     @VisibleForTesting
     static DataTransferStrategy buildForSnapshot(
+            SnapshotType.SharingFilesStrategy sharingFilesStrategy,
             @Nullable ForStFlinkFileSystem forStFlinkFileSystem,
             boolean isDbPathUnderCheckpointPathForSnapshot) {
         DataTransferStrategy strategy;
-        if (forStFlinkFileSystem == null || 
isDbPathUnderCheckpointPathForSnapshot) {
+        if (sharingFilesStrategy != 
SnapshotType.SharingFilesStrategy.FORWARD_BACKWARD

Review Comment:
   Indeed. I've added a check in 
```ForStIncrementalSnapshotStrategy#asyncSnapshot()```. It throws an 
```IllegalArgumentException``` when encountering 
```SharingFilesStrategy.FORWARD```.



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