From d2738ab203fe39bae812b05a8de4edea216ad6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Date: Tue, 3 May 2022 09:55:56 +0300 Subject: [PATCH] groupcache: reduce log severity (#5323) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes certain operations can fail with some error(-s) being expected e.g. a deletion marker might or might not exist. Thus, these log lines could get triggered even though nothing bad is happening. Since the expected errors are known only at the very end, near the call site, and because `error`s are already logged in other places, and because these Fetch()/Store() functions are working in best-effort scenario, I propose reducing the severity of these log lines to `debug`. Fixes https://github.com/thanos-io/thanos/issues/5265. Signed-off-by: Giedrius Statkevičius Signed-off-by: Wiard van Rij --- pkg/cache/groupcache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cache/groupcache.go b/pkg/cache/groupcache.go index 81d11504ac..f2dcd3ab5a 100644 --- a/pkg/cache/groupcache.go +++ b/pkg/cache/groupcache.go @@ -281,13 +281,13 @@ func (c *Groupcache) Fetch(ctx context.Context, keys []string) map[string][]byte codec := galaxycache.ByteCodec{} if err := c.galaxy.Get(ctx, k, &codec); err != nil { - level.Error(c.logger).Log("msg", "failed fetching data from groupcache", "err", err, "key", k) + level.Debug(c.logger).Log("msg", "failed fetching data from groupcache", "err", err, "key", k) continue } retrievedData, _, err := codec.MarshalBinary() if err != nil { - level.Error(c.logger).Log("msg", "failed retrieving data", "err", err, "key", k) + level.Debug(c.logger).Log("msg", "failed retrieving data", "err", err, "key", k) continue }