Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[v15] Prevent races counting missed heartbeats #49910

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions lib/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -1266,8 +1266,6 @@ func (a *Server) runPeriodicOperations() {

defer ticker.Stop()

missedKeepAliveCount := 0

// Prevent some periodic operations from running for dashboard tenants.
if !services.IsDashboard(*modules.GetModules().Features().ToProto()) {
ticker.Push(interval.SubInterval[periodicIntervalKey]{
Expand Down Expand Up @@ -1369,7 +1367,7 @@ func (a *Server) runPeriodicOperations() {
return false, nil
}
if services.NodeHasMissedKeepAlives(srv) {
missedKeepAliveCount++
heartbeatsMissedByAuth.Inc()
}
return false, nil
},
Expand All @@ -1385,9 +1383,6 @@ func (a *Server) runPeriodicOperations() {
break
}
}

// Update prometheus gauge
heartbeatsMissedByAuth.Set(float64(missedKeepAliveCount))
}()
case metricsKey:
go a.updateAgentMetrics()
Expand Down
Loading