Skip to content

Commit 161a3cf

Browse files
authored
fix(coderd/batchstats): use debug log on query cancellation in flush (#9778)
Fixes #9772
1 parent ceb52ac commit 161a3cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/batchstats/batcher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ func (b *Batcher) flush(ctx context.Context, forced bool, reason string) {
243243
err = b.store.InsertWorkspaceAgentStats(ctx, *b.buf)
244244
elapsed := time.Since(start)
245245
if err != nil {
246-
if xerrors.Is(err, context.Canceled) {
247-
b.log.Debug(ctx, "context canceled, skipping insert of workspace agent stats", slog.F("elapsed", elapsed))
246+
if database.IsQueryCanceledError(err) {
247+
b.log.Debug(ctx, "query canceled, skipping insert of workspace agent stats", slog.F("elapsed", elapsed))
248248
return
249249
}
250250
b.log.Error(ctx, "error inserting workspace agent stats", slog.Error(err), slog.F("elapsed", elapsed))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy