[lake/tiering] Add pendingRecordLag metric for lake tiering#3469
Open
beryllw wants to merge 5 commits into
Open
[lake/tiering] Add pendingRecordLag metric for lake tiering#3469beryllw wants to merge 5 commits into
beryllw wants to merge 5 commits into
Conversation
7579425 to
91dce35
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new backlog-aware lake-tiering metric (pendingRecordsLag) to better represent “how long the oldest committed-but-not-tiered record has been waiting”, avoiding false positives caused by idle periods.
Changes:
- Introduces
pendingRecordsLagmetric name and documents it in the metrics guide. - Adds
estimatedPendingStartTimeMstracking and new lag calculation helpers inLogTablet. - Registers the new gauge in
Replicaand adds tests covering idle-then-write and caught-up reset scenarios.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/docs/maintenance/observability/monitor-metrics.md | Documents the new pendingRecordsLag gauge under table_bucket_lakeTiering. |
| fluss-server/src/test/java/org/apache/fluss/server/replica/ReplicaTest.java | Adds a test ensuring pendingRecordsLag starts from 0 after an idle period when new backlog appears. |
| fluss-server/src/test/java/org/apache/fluss/server/replica/NotifyReplicaLakeTableOffsetTest.java | Adds a test ensuring pendingRecordsLag is cleared/reset when tiering catches up. |
| fluss-server/src/main/java/org/apache/fluss/server/replica/Replica.java | Registers the new LAKE_PENDING_RECORDS_LAG gauge and refactors timestampLag gauge to use LogTablet#getTimestampLag. |
| fluss-server/src/main/java/org/apache/fluss/server/log/LogTablet.java | Implements backlog detection + best-effort pending-start estimate and exposes getPendingRecordsLag / getTimestampLag. |
| fluss-common/src/main/java/org/apache/fluss/metrics/MetricNames.java | Adds LAKE_PENDING_RECORDS_LAG metric name constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
luoyuxia
reviewed
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #3464
Brief change log
Tests
API and Format
Documentation