Skip to content

Commit

Permalink
resourcemanager/server/manager.go:fix issue that the deleted resource…
Browse files Browse the repository at this point in the history
…-gruop still appear in metrics

Signed-off-by: AndreMouche <AndreMouche@126.com>
  • Loading branch information
AndreMouche committed Oct 16, 2024
1 parent b70107e commit f3777ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/mcs/resourcemanager/server/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func (m *Manager) backgroundMetricsFlush(ctx context.Context) {
sqlCPUCost.DeleteLabelValues(r.name, r.name, r.ruType)
requestCount.DeleteLabelValues(r.name, r.name, readTypeLabel)
requestCount.DeleteLabelValues(r.name, r.name, writeTypeLabel)
availableRUCounter.DeleteLabelValues(r.name, r.name, r.ruType)
availableRUCounter.DeleteLabelValues(r.name, r.name)

Check warning on line 454 in pkg/mcs/resourcemanager/server/manager.go

View check run for this annotation

Codecov / codecov/patch

pkg/mcs/resourcemanager/server/manager.go#L454

Added line #L454 was not covered by tests
delete(m.consumptionRecord, r)
delete(maxPerSecTrackers, r.name)
readRequestUnitMaxPerSecCost.DeleteLabelValues(r.name)
Expand Down

0 comments on commit f3777ef

Please sign in to comment.