You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/08/03 20:23:52 UTC

[GitHub] [flink] rkhachatryan commented on a diff in pull request #20103: [FLINK-28178][runtime-web] Show the delegated StateBackend and whethe…

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org