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



##########
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 agreed to use "flag" in **both** config and API. I didn't see this 
API change in this PR and assumed it's addition is postponed and for now 
explicit configuration will be used in Flink internally.
   I think that for internal use explicit configuration will be needed anyways; 
and to implement the "flag" in the API we'll have to remove this check.
   
   Furthermore, I don't see any reason why should we disallow users (or us) 
explicit configuration. If someone has already constructed and passed the 
backend here then it means it's already exposed.
   
   > I dont think deserialization would be a problem. That's why I ask where 
the concern comes from.
   
   Please see my [reply 
above](https://github.com/apache/flink/pull/14943#discussion_r583867401).




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