pnowojski commented on a change in pull request #18086:
URL: https://github.com/apache/flink/pull/18086#discussion_r769419921
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointType.java
##########
@@ -77,10 +93,31 @@ public String getName() {
return name;
}
+ public boolean canReuseFilesInSubsequentSnapshots() {
+ return sharingFilesStrategy == SharingFilesStrategy.FORWARD
+ || sharingFilesStrategy ==
SharingFilesStrategy.FORWARD_BACKWARD;
+ }
+
+ public boolean canReuseFilesFromPastSnapshots() {
+ return sharingFilesStrategy == SharingFilesStrategy.FORWARD_BACKWARD;
+ }
+
Review comment:
I would be rather -1 for exposing this via boolean flags.
1. Combination of `!canReuseFilesInSubsequentSnapshots() &&
canReuseFilesFromPastSnapshots()` is not valid (at least at the moment)
2. It will make future compatibility more fragile. If we add another
re-using mode exposed via another `canXYZ()` it will fail silently on state
backends that do not support it. On the other hand exposing the enum directly
`SharingFilesStrategy getSharingStrategy()` would fail (in correctly
implemented users) with `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]