Skip to content

refactor: add postgres tailnet coordinator #8044

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

Merged
merged 13 commits into from
Jun 21, 2023
Merged
Prev Previous commit
Next Next commit
fix log field name last_heartbeat
Signed-off-by: Spike Curtis <spike@coder.com>
  • Loading branch information
spikecurtis committed Jun 21, 2023
commit 197b5a6635db62c3e567398f1b545a681eea04e3
4 changes: 2 additions & 2 deletions enterprise/tailnet/pgcoord.go
Original file line number Diff line number Diff line change
Expand Up @@ -1161,11 +1161,11 @@ func (h *heartbeats) checkExpiry() {
expired := false
for id, t := range h.coordinators {
lastHB := now.Sub(t)
h.logger.Debug(h.ctx, "last heartbeat from coordinator", slog.F("other_coordinator", id), slog.F("last heartbeat", lastHB))
h.logger.Debug(h.ctx, "last heartbeat from coordinator", slog.F("other_coordinator", id), slog.F("last_heartbeat", lastHB))
if lastHB > MissedHeartbeats*HeartbeatPeriod {
expired = true
delete(h.coordinators, id)
h.logger.Info(h.ctx, "coordinator failed heartbeat check", slog.F("other_coordinator", id), slog.F("last heartbeat", lastHB))
h.logger.Info(h.ctx, "coordinator failed heartbeat check", slog.F("other_coordinator", id), slog.F("last_heartbeat", lastHB))
}
}
h.lock.Unlock()
Expand Down