From 279815818c7b7105373cf7b3376e78a151f033f4 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Thu, 20 Jun 2024 15:15:34 +0200 Subject: [PATCH] app/vmalert: fix typo in replay error handling Signed-off-by: hagen1778 --- app/vmalert/replay.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vmalert/replay.go b/app/vmalert/replay.go index 0d3a4a4d9..9559e85fe 100644 --- a/app/vmalert/replay.go +++ b/app/vmalert/replay.go @@ -69,8 +69,8 @@ func replay(groupsCfg []config.Group, qb datasource.QuerierBuilder, rw remotewri total += ng.Replay(tFrom, tTo, rw, *replayMaxDatapoints, *replayRuleRetryAttempts, *replayRulesDelay, *disableProgressBar) } logger.Infof("replay evaluation finished, generated %d samples", total) - if rw != nil { - return rw.Close() + if err := rw.Close(); err != nil { + return err } droppedRows := remotewrite.GetDroppedRows() if droppedRows > 0 {