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) (#10230)

close #10224
  • Loading branch information
ti-chi-bot authored Feb 2, 2024
1 parent b184ae0 commit d9077ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cdc/scheduler/internal/v3/replication/replication_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,10 @@ func (r *ReplicationSet) updateCheckpointAndStats(
r.Checkpoint.LastSyncedTs = checkpoint.LastSyncedTs
}

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 d9077ca

Please sign in to comment.