Skip to content

[metrics] Fix pendingRecords metric to return actual row count for primary key tables when lake tiering hasn't started#3059

Open
beryllw wants to merge 1 commit intoapache:mainfrom
beryllw:fix_pendingRecords
Open

[metrics] Fix pendingRecords metric to return actual row count for primary key tables when lake tiering hasn't started#3059
beryllw wants to merge 1 commit intoapache:mainfrom
beryllw:fix_pendingRecords

Conversation

@beryllw
Copy link
Copy Markdown
Contributor

@beryllw beryllw commented Apr 13, 2026

Purpose

Linked issue: close #xxx
Fix LAKE_PENDING_RECORDS metric for primary key tables when lake tiering hasn't started yet (getLakeLogEndOffset() < 0). Previously, it returned log size (highWatermark - startOffset) which doesn't reflect actual pending records for PK tables. Now returns materialized row count for PK tables.

Brief change log

Modified registerLakeTieringMetrics() in Replica.java to use getRowCount() for primary key tables when getLakeLogEndOffset() < 0, while keeping log size calculation for non-PK tables

Tests

API and Format

Documentation

@beryllw beryllw force-pushed the fix_pendingRecords branch from e074701 to 65e6504 Compare April 13, 2026 01:34
…imary key tables when lake tiering hasn't started.
@beryllw beryllw force-pushed the fix_pendingRecords branch from 65e6504 to 33dfb54 Compare April 13, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant