Skip to content

Commit

Permalink
Merge #97466
Browse files Browse the repository at this point in the history
97466: c2c: set replication_lag metric to 0 before high water mark is set r=stevendanna a=msbutler

Fixes #97224

Release note: None

Co-authored-by: Michael Butler <[email protected]>
  • Loading branch information
craig[bot] and msbutler committed Feb 27, 2023
2 parents f1a4c63 + 999406f commit 5d0c6ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ func (sf *streamIngestionFrontier) maybeUpdatePartitionProgress() error {
sf.metrics.JobProgressUpdates.Inc(1)
sf.persistedHighWater = f.Frontier()
sf.metrics.FrontierCheckpointSpanCount.Update(int64(len(frontierResolvedSpans)))
sf.metrics.FrontierLagNanos.Update(timeutil.Since(sf.persistedHighWater.GoTime()).Nanoseconds())

if !sf.persistedHighWater.IsEmpty() {
// Only update the frontier lag if the high water mark has been updated,
// implying the initial scan has completed.
sf.metrics.FrontierLagNanos.Update(timeutil.Since(sf.persistedHighWater.GoTime()).Nanoseconds())
}
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function (props: GraphDashboardProps) {
title="Replication Lag"
sources={storeSources}
tooltip={`The time between the wall clock and replicated time of the replication stream.
This metric tracks how far behind the replication stream is relative to now.`}
This metric tracks how far behind the replication stream is relative to now. This metric is set to 0 during the initial scan.`}
>
<Axis units={AxisUnits.Duration} label="time">
<Metric
Expand Down

0 comments on commit 5d0c6ee

Please sign in to comment.