Zakelly commented on code in PR #23987:
URL: https://github.com/apache/flink/pull/23987#discussion_r1440016826


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java:
##########
@@ -1040,8 +1041,9 @@ public void configure(ReadableConfig configuration, 
ClassLoader classLoader) {
         configuration
                 .getOptional(StateChangelogOptions.ENABLE_STATE_CHANGE_LOG)
                 .ifPresent(this::enableChangelogStateBackend);
-        Optional.ofNullable(loadStateBackend(configuration, classLoader))
-                .ifPresent(this::setStateBackend);
+        configuration
+                .getOptional(StateBackendOptions.STATE_BACKEND)
+                .ifPresent(conf -> 
setStateBackend(loadStateBackend(configuration, classLoader)));

Review Comment:
   @1996fanrui Thanks for your explanation! I missed the point of 
`getOptional`. Thus I have no more question. +1 from my side.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to