From 62fa77a820f67c6a85488c78c9a99827269e80f0 Mon Sep 17 00:00:00 2001 From: Vitor Savian Date: Tue, 19 Mar 2024 12:58:26 -0300 Subject: [PATCH] Add a error verification when failed list error is from context canceled Signed-off-by: Vitor Savian --- pkg/logstructured/sqllog/sql.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/logstructured/sqllog/sql.go b/pkg/logstructured/sqllog/sql.go index 4fe0e41e..a6105507 100644 --- a/pkg/logstructured/sqllog/sql.go +++ b/pkg/logstructured/sqllog/sql.go @@ -432,7 +432,9 @@ func (s *SQLLog) poll(result chan interface{}, pollStart int64) { rows, err := s.d.After(s.ctx, "%", s.currentRev, pollBatchSize) if err != nil { - logrus.Errorf("fail to list latest changes: %v", err) + if !errors.Is(err, context.Canceled) { + logrus.Errorf("fail to list latest changes: %v", err) + } continue }