Repository: minio/minio (language: go)

Issue:
Audit log with unable to heal 0 corrupted blocks
## NOTE
If this case is urgent, please subscribe to [Subnet](https://min.io/pricing) so that our 24/7 support team may help you faster.

<!--- Provide a general summary of the issue in the Title above -->

I was trying to understand a high `minio_heal_objects_heal_total` metric and looking at the audit logs I have hundreds of thousands of lines `unable to heal 0 missing blocks on drives` and `unable to heal 0 corrupted blocks on drive`

I have the case on bucket objects but also on "systems" objects such as the `.minio.sys` bucket and `buckets/mypersonalbucket/.usage-cache.bin` objects

## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->

I'm not sure it should log it couldn't heal 0 blocks, it means there's nothing to heal ?

## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->

N/A

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

N/A

## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
<!--- and make sure you have followed https://github.com/minio/minio/tree/release/docs/debugging to capture relevant logs -->

N/A

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

I'm trying to understand an elevated heal metrics

## Regression
<!-- Is this issue a regression? (Yes / No) -->
<!-- If Yes, optionally please include minio version or commit id or PR# that caused this regression, if you have these details. -->

I think it's a regression [introduced here](https://github.com/minio/minio/commit/e7a56f35b9bc8e782a4b0864c92627dfab2b3853) which is included in the version I'm running

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used (`minio --version`): minio version RELEASE.2024-08-26T15-33-07Z (commit-id=1c4d28d7af0373cde810703839a179739dbe6f34)
* Server setup and configuration: 4x 24
* Operating System and version (`uname -a`): `Ubuntu 22.04` / `Linux minio1-node2.pr.par5.numberly.net 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux`



Discussion / hints:
This is not a regression as such; it was created to reduce the number of audit logs. Audit log has sufficient information to understand the final location of the object. 

You have some production issues on the setup that require immediate attention https://min.io/pricing is the right way to go, all the tooling that helps debug your problem requires an active subscription with us.


Fix patch:
diff --git a/cmd/erasure-healing.go b/cmd/erasure-healing.go
index 6f4ea4fd577c1..bd6abf137195f 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)
 	}
 


Test patch: