ignore healing .trash, .metacache amd .multipart paths (#11725)

This commit is contained in:
Harshavardhana
2021-03-07 09:38:31 -08:00
committed by GitHub
parent 9ccc483df6
commit 78e867e145
2 changed files with 30 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ import (
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/madmin"
"github.com/minio/minio/pkg/sync/errgroup"
"github.com/minio/minio/pkg/wildcard"
)
type erasureServerPools struct {
@@ -1475,6 +1476,20 @@ func (z *erasureServerPools) HealObjects(ctx context.Context, bucket, prefix str
if entry.isDir() {
return
}
// We might land at .metacache, .trash, .multipart
// no need to heal them skip, only when bucket
// is '.minio.sys'
if bucket == minioMetaBucket {
if wildcard.Match("buckets/*/.metacache/*", entry.name) {
return
}
if wildcard.Match("tmp/.trash/*", entry.name) {
return
}
if wildcard.Match("multipart/*", entry.name) {
return
}
}
fivs, err := entry.fileInfoVersions(bucket)
if err != nil {
errCh <- err