mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
avoid triggering heals on metacache files if any (#19299)
This commit is contained in:
20
cmd/mrf.go
20
cmd/mrf.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user