Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metric to track number of segments missed in upsert-snapshot #12581

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public enum ServerGauge implements AbstractMetrics.Gauge {
END_TO_END_REALTIME_INGESTION_DELAY_MS("milliseconds", false),
// Needed to track if valid doc id snapshots are present for faster restarts
UPSERT_VALID_DOC_ID_SNAPSHOT_COUNT("upsertValidDocIdSnapshotCount", false),
UPSERT_PRIMARY_KEYS_IN_SNAPSHOT_COUNT("upsertPrimaryKeysInSnapshotCount", false);
UPSERT_PRIMARY_KEYS_IN_SNAPSHOT_COUNT("upsertPrimaryKeysInSnapshotCount", false),
UPSERT_MISSED_VALID_DOC_ID_SNAPSHOT_COUNT("upsertMissedValidDocIdSnapshotCount", false);

private final String _gaugeName;
private final String _unit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,9 @@ protected void doTakeSnapshot() {
ServerGauge.UPSERT_VALID_DOC_ID_SNAPSHOT_COUNT, numImmutableSegments);
_serverMetrics.setValueOfPartitionGauge(_tableNameWithType, _partitionId,
ServerGauge.UPSERT_PRIMARY_KEYS_IN_SNAPSHOT_COUNT, numPrimaryKeysInSnapshot);
_serverMetrics.setValueOfPartitionGauge(_tableNameWithType, _partitionId,
tibrewalpratik17 marked this conversation as resolved.
Show resolved Hide resolved
ServerGauge.UPSERT_MISSED_VALID_DOC_ID_SNAPSHOT_COUNT,
numTrackedSegments - numImmutableSegments - numConsumingSegments);
_logger.info("Finished taking snapshot for {} immutable segments with {} primary keys (out of {} total segments, "
+ "{} are consuming segments) in {} ms", numImmutableSegments, numPrimaryKeysInSnapshot, numTrackedSegments,
numConsumingSegments, System.currentTimeMillis() - startTimeMs);
Expand Down
Loading