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



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

Review comment:
       Isn't this exactly the non future proof way of implementing this flag 
that I was mentioning?
   
   shouldn't this be
   ```
   switch (getSharingFilesStrategy()) ) {
     case FORWARD_BACKWARD:
        (...)
     case FORWARD:
         (...)
     case NO_SHARING:
     default:
        throw new UnsupportedOperationException();
   }
   ```
   ?




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