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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/StateBackendLoader.java
##########
@@ -204,6 +222,11 @@ public static StateBackend 
fromApplicationOrConfigOrDefault(
 
         // (1) the application defined state backend has precedence
         if (fromApplication != null) {
+
+            checkArgument(
+                    !(fromApplication instanceof DelegateStateBackend),
+                    "DelegateStateBackend can not be delegated!");

Review comment:
       >  we do not allow changelogstatebackend from the application.
   
   Do you mean user can NOT use java API, only config? Why?
   I think user SHOULD be able to configure backend via both API and config.
   
   I mean a scenario when
   1. `ChangelogStateBackend` is created in the user app 
   2. then stored (serialized) on JM 
   3. then deserialized on TM 
   4. the passed to this method
   
   P.S.: this method anyways should not perform the check as it is not aware of 
**why** this check should be done.
   [This](https://github.com/apache/flink/pull/14943#discussion_r583600890) is 
I think the right place.




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


Reply via email to