Zakelly commented on a change in pull request #16153:
URL: https://github.com/apache/flink/pull/16153#discussion_r654809920



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/StateBackendLoader.java
##########
@@ -384,6 +358,22 @@ public static boolean 
stateBackendFromApplicationOrConfigOrDefaultUseManagedMemo
         return false;
     }
 
+    /**
+     * Try to unwrap a DelegatingStateBackend and get the inner delegated 
StateBackend. If the
+     * provided StateBackend is not a delegated StateBackend, just return 
itself.
+     *
+     * @param backend the provided StateBackend that may delegate another 
StateBackend.
+     * @return the root StateBackend W/O delegation.
+     */
+    @VisibleForTesting
+    public static StateBackend unwrapFromDelegatingStateBackend(StateBackend 
backend) {
+        if (backend != null && backend instanceof DelegatingStateBackend) {

Review comment:
       Sure, moved to ```ChangelogStateBackendLoadingTest```.




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