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



##########
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:
       But does not ALL OF US agree that `ChangelogStateBackend` is only 
configured through "flag"? That long discussion with Seth, Piotr, Arvid and 
you??
   
   Please check the COUPLE OF HILIGHTS of this PR
   "ChangelogStateBackend is enabled through configuration key 
"state.backend.enable-statechangelog". It is not directly exposed to users, 
because ChangelogStateBackend is an implementation detail and users should NOT 
be aware of it. In other words, application initialization is not supported:
   evn.setStateBackend(new ChangelogStateBackend(...)) NOT SUPPORT"
   
   And that's why I added the check 
   
   """
   checkArgument(
                       !(fromApplication instanceof DelegateStateBackend),
                       "DelegateStateBackend can only be enabled through 
configuration!");
   """
   
   And I **do not** think we should expose that implementation logic to users 
to complicate statebackend initiation, which now is already very complicated 
given the introduction of the HashMap state backend.
   
   
   Even if it allows to configure through the app, I dont think deserialization 
would be a problem. That's why I ask where the concern comes from.
   




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