pnowojski commented on a change in pull request #14943:
URL: https://github.com/apache/flink/pull/14943#discussion_r591645572
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStorageLoader.java
##########
@@ -185,16 +186,21 @@ public static CheckpointStorage load(
CheckpointingOptions.SAVEPOINT_DIRECTORY,
defaultSavepointDirectory.toString());
}
- // Legacy state backends always take precedence
- // for backwards compatibility.
- if (configuredStateBackend instanceof CheckpointStorage) {
+ // Legacy state backends always take precedence for backwards
compatibility.
+ StateBackend rootStateBackend =
+ (configuredStateBackend instanceof DelegatingStateBackend)
+ ? ((DelegatingStateBackend) configuredStateBackend)
+ .getDelegatedStateBackend()
+ : configuredStateBackend;
+
+ if (rootStateBackend instanceof CheckpointStorage) {
Review comment:
nit: wouldn't it be better to replace this with a default method in
`StateBackend`:
```
interface StateBackend {
...
default boolean isCheckpointStorage() {
return this instanceof CheckpointStorage;
}
...
}
```
and overload this method in `DelegatingStateBackend`/`ChangelogStateBackend`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]