luoyuxia commented on code in PR #1729:
URL: https://github.com/apache/fluss/pull/1729#discussion_r2371519072


##########
fluss-server/src/main/java/org/apache/fluss/server/replica/Replica.java:
##########
@@ -540,11 +546,30 @@ private void onBecomeNewLeader() {
         }
     }
 
+    private void registerLakeTieringMetrics() {
+        lakeTieringMetricGroup = bucketMetricGroup.addGroup("lakeTiering");
+        lakeTieringMetricGroup.gauge(
+                MetricNames.LOG_LAKE_PENDING_RECORDS,
+                () ->
+                        getLakeLogEndOffset() < 0L
+                                ? getLogHighWatermark()
+                                : getLogHighWatermark() - 
getLakeLogEndOffset());
+        lakeTieringMetricGroup.gauge(
+                MetricNames.LOG_LAKE_TIMESTAMP_LAG,
+                () ->
+                        logTablet.getLakeMaxTimestamp() < 0L
+                                ? logTablet.getLakeMaxTimestamp()

Review Comment:
   > @luoyuxia it make sense for me, and should `LOG_LAKE_LAG_RECORDS` follow 
it?
   
   Yes, I think `LOG_LAKE_LAG_RECORDS` follow it, return high watermark is not 
correct since log will ttl, high watermark  can't represent pending records.



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