Skip to content

Commit cae095f

Browse files
authored
fix: stop logging errors on canceled cleanup queries (#11547)
Fixes flake seen here: https://github.com/coder/coder/actions/runs/7474259128/job/20340051975
1 parent 9682db5 commit cae095f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

enterprise/tailnet/pgcoord.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1546,15 +1546,15 @@ func (h *heartbeats) cleanup() {
15461546
// the records we are attempting to clean up do no serious harm other than
15471547
// accumulating in the tables, so we don't bother retrying if it fails.
15481548
err := h.store.CleanTailnetCoordinators(h.ctx)
1549-
if err != nil {
1549+
if err != nil && !database.IsQueryCanceledError(err) {
15501550
h.logger.Error(h.ctx, "failed to cleanup old coordinators", slog.Error(err))
15511551
}
15521552
err = h.store.CleanTailnetLostPeers(h.ctx)
1553-
if err != nil {
1553+
if err != nil && !database.IsQueryCanceledError(err) {
15541554
h.logger.Error(h.ctx, "failed to cleanup lost peers", slog.Error(err))
15551555
}
15561556
err = h.store.CleanTailnetTunnels(h.ctx)
1557-
if err != nil {
1557+
if err != nil && !database.IsQueryCanceledError(err) {
15581558
h.logger.Error(h.ctx, "failed to cleanup abandoned tunnels", slog.Error(err))
15591559
}
15601560
h.logger.Debug(h.ctx, "completed cleanup")

0 commit comments

Comments
 (0)