From ded0b19d97bb9f73f4d78382eb131ff80003e272 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 2 Oct 2024 10:50:41 -0700 Subject: [PATCH] avoid audit logs with unexpected errors (#20516) fixes #20513 --- cmd/erasure-healing.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/erasure-healing.go b/cmd/erasure-healing.go index 6f4ea4fd5..bd6abf137 100644 --- a/cmd/erasure-healing.go +++ b/cmd/erasure-healing.go @@ -234,11 +234,12 @@ func (er *erasureObjects) auditHealObject(ctx context.Context, bucket, object, v } b, a := result.GetCorruptedCounts() - if b == a { + if b > 0 && b == a { opts.Error = fmt.Sprintf("unable to heal %d corrupted blocks on drives", b) } + b, a = result.GetMissingCounts() - if b == a { + if b > 0 && b == a { opts.Error = fmt.Sprintf("unable to heal %d missing blocks on drives", b) }