Skip to content

Commit

Permalink
scheduler(ticdc): Updating ReplicationSet.stats only when stats is no…
Browse files Browse the repository at this point in the history
…t empty (#10225) (#10229)

close #10224
  • Loading branch information
ti-chi-bot authored Dec 4, 2023
1 parent 7b984d6 commit 7ae0988
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cdc/scheduler/internal/v3/replication/replication_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,11 @@ func (r *ReplicationSet) updateCheckpointAndStats(
zap.Any("checkpointTs", r.Checkpoint.CheckpointTs),
zap.Any("resolvedTs", r.Checkpoint.ResolvedTs))
}
r.Stats = stats

// we only update stats when stats is not empty, because we only collect stats every 10s.
if stats.Size() > 0 {
r.Stats = stats
}
}

// SetHeap is a max-heap, it implements heap.Interface.
Expand Down

0 comments on commit 7ae0988

Please sign in to comment.