X-czh commented on code in PR #23447: URL: https://github.com/apache/flink/pull/23447#discussion_r1429559942
########## flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricStore.java: ########## @@ -126,9 +140,14 @@ public synchronized void updateCurrentExecutionAttempts(Collection<JobDetails> j taskMetricStore.getSubtaskMetricStore( subtaskIndex)) .ifPresent( - subtaskMetricStore -> - subtaskMetricStore.retainAttempts( - attempts.getCurrentAttempts())); + subtaskMetricStore -> { + subtaskMetricStore.retainAttempts( Review Comment: Good catch! But I'm wondering if this is a good approach to do so here. It complicates the code and makes maintenance more difficult. Since the duplication was introduced to overcome the issue that WebInterface task metric queries currently do not account for subtasks, how about leaving it unremoved here for now and create a new JIRA on updating the WebInterface to account for subtasks? I'd be willing to help with that as well. cc @JunRuiLee @wanglijie95 -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org