liuml07 commented on code in PR #26744:
URL: https://github.com/apache/flink/pull/26744#discussion_r2184799731


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCheckpointStatsTracker.java:
##########
@@ -543,6 +551,18 @@ public Long getValue() {
         }
     }
 
+    private class LatestCompletedCheckpointMetadataSizeGauge implements 
Gauge<Long> {
+        @Override
+        public Long getValue() {
+            CompletedCheckpointStats completed = latestCompletedCheckpoint;
+            if (completed != null) {
+                return completed.getMetadataSize();
+            } else {
+                return -1L;
+            }

Review Comment:
   Actually this should be returning `completed.getMetadataSize()` instead of 
`completed.getStateSize()`. Fortunately we have the test that fails so it's 
caught.
   
   I used the if-else following other methods convention in this class. But 
using ternary operator seems more concise, so I still switched per this comment.



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