1996fanrui commented on code in PR #25832: URL: https://github.com/apache/flink/pull/25832#discussion_r1901545914
########## flink-runtime/src/main/java/org/apache/flink/runtime/metrics/util/MetricUtils.java: ########## @@ -366,6 +369,17 @@ private static void instantiateCPUMetrics(MetricGroup metrics) { } } + public static String truncateOperatorName(String operatorName, int maxLength) { Review Comment: > if maxlength is less than the Suffix length and there is a suffix in the data, this will end up with a negative length. Or is this not possible? Thanks @davidradl for the comment, it's interesting. IIUC, current PR only has 2 suffixes: Writer and Committer. Both of length are less than the maxlength(80), so it doesn't happen. But I'm not sure will it happen in the future. Anyway, we could optimize the logic to avoid the negative length. It will make the code more robust. @Tartarus0zm WDYT? BTW, it's better to let reviewer click the resolve conversation. It's helpful for reviewer to check whether all comments are addressed properly. -- 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