avoid triggering heals on metacache files if any (#19299)

This commit is contained in:
Harshavardhana
2024-03-19 20:21:15 -07:00
committed by GitHub
parent 383489d5d9
commit 1173b26fc8
3 changed files with 25 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ import (
"time"
"github.com/minio/madmin-go/v3"
"github.com/minio/pkg/v2/wildcard"
)
const (
@@ -73,6 +74,25 @@ func (m *mrfState) healRoutine(z *erasureServerPools) {
return
}
// We might land at .metacache, .trash, .multipart
// no need to heal them skip, only when bucket
// is '.minio.sys'
if u.bucket == minioMetaBucket {
// No MRF needed for temporary objects
if wildcard.Match("buckets/*/.metacache/*", u.object) {
continue
}
if wildcard.Match("tmp/*", u.object) {
continue
}
if wildcard.Match("multipart/*", u.object) {
continue
}
if wildcard.Match("tmp-old/*", u.object) {
continue
}
}
now := time.Now()
if now.Sub(u.queued) < time.Second {
// let recently failed networks to reconnect