avoid audit logs with unexpected errors (#20516)

fixes #20513
This commit is contained in:
Harshavardhana 2024-10-02 10:50:41 -07:00 committed by GitHub
parent d0bb3dd136
commit ded0b19d97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -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)
}