curcur commented on a change in pull request #14943:
URL: https://github.com/apache/flink/pull/14943#discussion_r578903917



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStorageLoader.java
##########
@@ -162,14 +163,19 @@ public static CheckpointStorage load(
         Preconditions.checkNotNull(classLoader, "classLoader");
         Preconditions.checkNotNull(configuredStateBackend, "statebackend");
 
-        if (configuredStateBackend instanceof CheckpointStorage) {
+        StateBackend rootStateBackend =
+                (configuredStateBackend instanceof DelegateStateBackend)
+                        ? ((DelegateStateBackend) 
configuredStateBackend).getDelegatedStateBackend()
+                        : configuredStateBackend;

Review comment:
       DelegateStateBackend (Abstract class) is added exactly for that purpose. 
   New delegating/proxying only needs to extends DelegateStateBackend, like 
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:
us...@infra.apache.org


Reply via email to