Skip to content
New issue

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

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

Already on GitHub? # to your account

scheduler monitoring inacurrate #11562

Closed
3AceShowHand opened this issue Sep 3, 2024 · 1 comment · Fixed by #11567
Closed

scheduler monitoring inacurrate #11562

3AceShowHand opened this issue Sep 3, 2024 · 1 comment · Fixed by #11567
Labels
affects-7.5 affects-8.1 area/ticdc Issues or PRs related to TiCDC. component/metrics-logging Metrics and logging component. severity/minor type/bug The issue is confirmed as a bug.

Comments

@3AceShowHand
Copy link
Contributor

image

The unkown-0 should not be recorded and displyed

@3AceShowHand 3AceShowHand added type/bug The issue is confirmed as a bug. severity/minor area/ticdc Issues or PRs related to TiCDC. affects-7.5 affects-8.1 component/metrics-logging Metrics and logging component. labels Sep 3, 2024
@wk989898
Copy link
Contributor

wk989898 commented Sep 4, 2024

Each state will be recorded, and may there be unknown when an error occurs?

var stateCounters [6]int
r.spans.Ascend(func(span tablepb.Span, table *ReplicationSet) bool {
switch table.State {
case ReplicationSetStateUnknown:
stateCounters[ReplicationSetStateUnknown]++
case ReplicationSetStateAbsent:
stateCounters[ReplicationSetStateAbsent]++
case ReplicationSetStatePrepare:
stateCounters[ReplicationSetStatePrepare]++
case ReplicationSetStateCommit:
stateCounters[ReplicationSetStateCommit]++
case ReplicationSetStateReplicating:
stateCounters[ReplicationSetStateReplicating]++
case ReplicationSetStateRemoving:
stateCounters[ReplicationSetStateRemoving]++
}
return true
})
for s, counter := range stateCounters {
tableStateGauge.
WithLabelValues(cf.Namespace, cf.ID, ReplicationSetState(s).String()).
Set(float64(counter))
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
affects-7.5 affects-8.1 area/ticdc Issues or PRs related to TiCDC. component/metrics-logging Metrics and logging component. severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants