You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fluss.apache.org by yu...@apache.org on 2026/07/17 12:24:49 UTC

(fluss) branch main updated: [lake/tiering] Add tieredTimestamp metric exposing the last successful lake tiering time (#3678)

This is an automated email from the ASF dual-hosted git repository.

luoyuxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git


The following commit(s) were added to refs/heads/main by this push:
     new 6ce5d9d7a [lake/tiering] Add tieredTimestamp metric exposing the last successful lake tiering time (#3678)
6ce5d9d7a is described below

commit 6ce5d9d7a02bc54309652ac19a9d3c887604894b
Author: Junbo Wang <be...@gmail.com>
AuthorDate: Fri Jul 17 20:24:44 2026 +0800

    [lake/tiering] Add tieredTimestamp metric exposing the last successful lake tiering time (#3678)
---
 .../src/main/java/org/apache/fluss/metrics/MetricNames.java        | 1 +
 .../apache/fluss/server/coordinator/LakeTableTieringManager.java   | 5 +++++
 website/docs/maintenance/observability/monitor-metrics.md          | 7 ++++++-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/fluss-common/src/main/java/org/apache/fluss/metrics/MetricNames.java b/fluss-common/src/main/java/org/apache/fluss/metrics/MetricNames.java
index 3d44f6290..5b24b5b67 100644
--- a/fluss-common/src/main/java/org/apache/fluss/metrics/MetricNames.java
+++ b/fluss-common/src/main/java/org/apache/fluss/metrics/MetricNames.java
@@ -69,6 +69,7 @@ public class MetricNames {
 
     // for lake tiering table-level metrics
     public static final String LAKE_TIERING_TABLE_TIER_LAG = "tierLag";
+    public static final String LAKE_TIERING_TABLE_TIERED_TIMESTAMP = "tieredTimestamp";
     public static final String LAKE_TIERING_TABLE_TIER_DURATION = "tierDuration";
     public static final String LAKE_TIERING_TABLE_FAILURES_TOTAL = "failuresTotal";
     public static final String LAKE_TIERING_TABLE_FILE_SIZE = "fileSize";
diff --git a/fluss-server/src/main/java/org/apache/fluss/server/coordinator/LakeTableTieringManager.java b/fluss-server/src/main/java/org/apache/fluss/server/coordinator/LakeTableTieringManager.java
index e281381de..9498c45ec 100644
--- a/fluss-server/src/main/java/org/apache/fluss/server/coordinator/LakeTableTieringManager.java
+++ b/fluss-server/src/main/java/org/apache/fluss/server/coordinator/LakeTableTieringManager.java
@@ -280,6 +280,11 @@ public class LakeTableTieringManager implements AutoCloseable {
                                     return r != null ? clock.milliseconds() - r.tieredTime : -1L;
                                 }));
 
+        // tieredTimestamp: epoch timestamp (ms) of the last successful tiering
+        tableMetricGroup.gauge(
+                MetricNames.LAKE_TIERING_TABLE_TIERED_TIMESTAMP,
+                () -> inReadLock(lock, () -> getLastResultField(tableId, r -> r.tieredTime)));
+
         // tierDuration: duration of last tiering job
         tableMetricGroup.gauge(
                 MetricNames.LAKE_TIERING_TABLE_TIER_DURATION,
diff --git a/website/docs/maintenance/observability/monitor-metrics.md b/website/docs/maintenance/observability/monitor-metrics.md
index 50ae66ea3..9142a15dc 100644
--- a/website/docs/maintenance/observability/monitor-metrics.md
+++ b/website/docs/maintenance/observability/monitor-metrics.md
@@ -406,11 +406,16 @@ Some metrics might not be exposed when using other JVM implementations (e.g. IBM
       <td>Gauge</td>
     </tr>
     <tr>
-      <td rowspan="7">lakeTiering_table</td>
+      <td rowspan="8">lakeTiering_table</td>
       <td>tierLag</td>
       <td>Time in milliseconds since the last successful tiering operation for this table. For newly registered tables that have never completed a tiering round, the lag is measured from the time the table was registered.</td>
       <td>Gauge</td>
     </tr>
+    <tr>
+      <td>tieredTimestamp</td>
+      <td>The epoch timestamp (in milliseconds) of the last successful tiering operation for this table. For newly registered tables that have never completed a tiering round, this is the time the table was registered.</td>
+      <td>Gauge</td>
+    </tr>
     <tr>
       <td>tierDuration</td>
       <td>Duration in milliseconds of the last tiering operation for this table.</td>