rkhachatryan commented on code in PR #20103:
URL: https://github.com/apache/flink/pull/20103#discussion_r937093155


##########
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/DefaultExecutionGraph.java:
##########
@@ -517,7 +527,16 @@ public void failJobDueToTaskFailure(
             
registerJobStatusListener(checkpointCoordinator.createActivatorDeactivator());
         }
 
-        this.stateBackendName = 
checkpointStateBackend.getClass().getSimpleName();
+        if 
(StateBackendLoader.isChangelogStateBackend(checkpointStateBackend)) {
+            this.stateChangelogEnabled = TernaryBoolean.TRUE;
+            StateBackend delegatedStateBackend =
+                    ((DelegatingStateBackend) 
checkpointStateBackend).getDelegatedStateBackend();
+            this.stateBackendName = 
delegatedStateBackend.getClass().getSimpleName();
+        } else {
+            this.stateChangelogEnabled = TernaryBoolean.FALSE;
+            this.stateBackendName = 
checkpointStateBackend.getClass().getSimpleName();
+        }
+

Review Comment:
   Can we replace `if` with class-dependent logic here?
   For example
   ```
   this.stateBackendName = checkpointStateBackend.getName();
   this.stateChangelogEnabled =
           TernaryBoolean.fromBoolean(
                   
StateBackendLoader.isChangelogStateBackend(checkpointStateBackend));
   ```
   
   Where `getName()` by default returns `this.getClass().getSimpleName()`,
   and changelog returns `delegatedStateBackend.getName()`?



##########
docs/layouts/shortcodes/generated/rest_v1_dispatcher.html:
##########
@@ -2335,6 +2335,9 @@
     "state_backend" : {
       "type" : "string"
     },
+    "state_changelog_enabled" : {
+      "type" : "boolean"
+    },

Review Comment:
   Is this actually related to this PR? Or #20103?



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